[OSM-dev] Looking for guidance on interpreting multipolygon relations
Christopher Schmidt
crschmidt at metacarta.com
Sat Nov 3 20:17:36 GMT 2007
On Sat, Nov 03, 2007 at 07:49:52PM +0000, Jon Burgess wrote:
> 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.
Strongly in favor!
We discussed this on IRC at one point, and I think we came to the same
conclusion. In fact, I even edited the Multipolygon wiki page (at the
encouragement of others) to state this suggestion:
http://wiki.openstreetmap.org/index.php/Relations/Multipolygon
Regards,
--
Christopher Schmidt
MetaCarta
More information about the dev
mailing list