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

Jon Burgess jburgess777 at googlemail.com
Sat Nov 3 19:49:52 GMT 2007


On Sat, 2007-11-03 at 20:31 +0100, Martijn van Oosterhout wrote:
> On 11/3/07, Jon Burgess <jburgess777 at googlemail.com> 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.
> 
> In retrospect I guess this was short-sighted. The relation should
> probably have included information about positive and negative areas,
> or inner/outer rings. But it's a little late to fix now :)
> 
> Have a nice day,

I don't see anything which stop us from adding in this additional
information. It would take some time to update all the existing
multipolygons but is something which can be automated. 

Adding role='outer' on one of the members should be enough to
unambiguously describe the rings multipolygon. It can only ever have a
single outer ring, any others must be holes.

	Jon






More information about the dev mailing list