[OSM-dev] Looking for guidance on interpreting multipolygon relations

bvh bvh-osm at irule.be
Sat Nov 3 14:33:39 GMT 2007


On Sat, Nov 03, 2007 at 12:37:05PM +0000, Jon Burgess wrote:
> When I wrote the Mapnik/osm2pgsql code to handle this I think decided to
> use an aggregate on all the tags on all the ways in the multipolygon. At
> the time it first wants to know what tags to use the code unfortunately
> has no idea which way is the outer one (since the information is not in
> the relation). It works out which ring is the outer one by sorting them
> by the enclosed area. I could probably make it re-evaluate the tags
> after it has determined which way is the outer ring.

What happens on conflicting tags in the aggregate?

> > > If you are of the opinion that the *whole* forms a park - i.e. if you
> > > would say the lake is part of the park rather than an area where the
> > > park stops - then I would advise tagging way A as "leisure=park" (this
> > > area does not have a hole then - do not use relations) and use one
> > > relation with outer=B inner=C inner=D tagged natural=water for the
> > > lake.
> > And how would a renderer know that it has to render the first relation
> > before the second relation? Not with layers I hope because then we
> > are back where we started.
> The way the Mapnik layer currently determines this is by calculating the
> area of each polygon. The polygons covering the largest area get
> rendered first. 

Is this case described above there are two different relations
(multipolygons). So mapnik will decide rendering order between
those two relations with covered area? I was hoping to avoid any
of those calculations because it is probably not going to be fast
enough for what I want to do.

cu bart




More information about the dev mailing list