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

bvh bvh-osm at irule.be
Sat Nov 3 08:13:45 GMT 2007


Just an informational question : which of the renderers already know
about multipolygon relations? And which rules to they follow? 

I am adding multipolygon relations in the rendering mix for Merkaartor
and it seems they are used in totally different and incompatible ways.
This probably is a result of the conversion to the 0.5 API where any way
with holes was converted to a multipolygon relation.

So, how should multipolygon relations really work?

Let's start with a simple example : a park with a lake and a few
islands in that lake. (Battersea Park in Londen 51.4805/-0.153808)

Way A = outside of the park
Way B = inside of the park/outside of the lake
Way C/D = inside of the lake/outside of the island

First how should we tag them?

A: leisure=park
B: natural=water?
C/D: leisure=park?

Note that Battersea park tags C/D as natural=water (its inside role). 
That is inconsistent with the way B is tagged (its outside role)

I propose the following rule :

A way that is both an inside and outside of some area, tag it according
to it's outside role.

Rationale : renderers must know if a tag on an area that potentially fills
an area works on the inside of the outside of said way.

The big disadvantage of this rule is that it will need quite a few
modifications. The big advantage is that we can remove the hackery
with layers=1/2/3 completly to get this kind of structures represented
and rendered nicely.

Next up the relations themselves. The wiki says about them that they should
have one outer polygon and multiple inner ones. But it does not really
specify anything about nested islands.

Relation X = A+B to represent the main part of the park (not the islands)
Relation Y = B+C/D to represent the lake with the islands

Here I propose the following clarification to the wiki :

Within one multipolygon relation no inner way should contain any other
inner way. Thus nested islands need to be represented with two
relations.

If someone should want to group the whole park area he would have to add
a relation T = A+B+C/D which is _not_ a multipolygon. A perfect renderer
can then use relation X and Y to decide filling and relation T to place
the label.

Would all this make sense as a clarification?

cu bart




More information about the dev mailing list