[OSM-dev] Nested relations and generic implementation of geometry constructs - Was :osm2pgsql patch for nested relations

sly (sylvain letuffe) liste at letuffe.org
Fri Mar 2 17:15:40 GMT 2012


On vendredi 2 mars 2012, Peter Körner wrote:

> By defining algorithms to work with relations in one place and mapping 
> relation-types to that algorithms in another place.

The idea looks sexy, but relations have so many different construction that 
you will probably end with as much algorithms as there are relation types.
 
> For example:

Let's see what exists :

type=multipolygon --> build-polygon (but waterway=riverbank and some lakes are 
constructed with touching outer rings loosing the true geometry, if proper 
processing is needed we whould need special tweaks of those cases)
type=multipolygon are note expressly said to allow nested relations

type=boundary --> almost build-polygon, but some members sneaked their way as 
subareas while not part of the geometry and roles are different.
In those there are cases where nested relation are forming the geometry

type=site (relation become categories ?)--> build-polygon but only for members 
with role=perimeter and tags are pushed down

type=route  --> build-linestring but only one route/(blank), and conditionnal 
on those backward/forward/north/south/east/west

type=waterway  --> build-graph special to handle the main stream and the side 
streams to build a graph and not a linestring (special handling at GIS side 
because it doesn't exist as valid WKT)

type=street/associatedStreet --> build-linestring with role conditions


There are others, but each might need some special roles conditions and the 
way tags apply to what might be kind of special

> The goal should be reducing the number of algorithms and re-using them 
> as much as possible.

I understand the goal, but fear that it won't be so easy


-- 
sly
qui suis-je : http://sly.letuffe.org
email perso : sylvain chez letuffe un point org



More information about the dev mailing list