[OSM-talk] area_with_holes as alternative to multipolygon relation
Jon Burgess
jburgess777 at googlemail.com
Mon Mar 10 20:42:04 GMT 2008
On Mon, 2008-03-10 at 21:07 +0100, Frederik Ramm wrote:
> Hi,
>
> > Let's go with type=area_with_holes then, roles outer and inner as
> > before. All members are closed ways, the "inner" ways are contained
> > in the interior of the single "outer" way. The area_with_holes is the
> > interior of the "outer" way minus the interiors of the "inner" ways.
> > The properties of this area are described by the tags on the "outer"
> > way (one might also put tags on the relation here). The orientation
> > of the ways doesn't come in.
>
> That's precisely what I thought the "multipolygon" type would do at
> the moment (minus the fact that some don't yet have inner/outer tags
> but that's being dealt with I believe).
That may be what we want but a significant proportion of the existing
data also has:
1) an outer ring which is not a single closed way
2) the same tags on all of the ways
The current osm2pgsql code relies on the second property to help fix up
the missing roles and rejoin the ways for the outer ring.
If all the rings were closed and the roles where correctly defined then
there is a relatively simple algorithm to reconstruct the multipolygons
without needing too much memory or CPU overhead.
Right now, if we just remove the tags but fail to fix the other
properties then we either lose a significant proportion of the current
areas from the map or the amount of memory required for the processing
grows significantly.
Jon
More information about the talk
mailing list