[OSM-talk] fixing multipolygons

Martijn van Oosterhout kleptog at gmail.com
Sun Mar 9 17:42:12 GMT 2008


On Sun, Mar 9, 2008 at 5:58 PM, Jon Burgess <jburgess777 at googlemail.com> wrote:
>  It just so happens that the existing multipolygon handling code in
>  osm2pgsql will convert these ways into a closed area for the Mapnik
>  rendering. I can not remember whether this was by accident or design but
>  it would be nice not to lose these areas.

FWIW, it was pointed out to me today that osm2pgsql actually creates
invalid geometries, presumably via this relation parsing (I havn't had
a chance to track it down). If you do:

# select count(*) from planet_osm_polygon where not  isvalid(way);

You get 138 for just the NL portion of the planet dump. The errors are
a combination of:

NOTICE:  Self-intersection
NOTICE:  Hole lies outside shell
NOTICE:  Ring Self-intersection

The first being the most common. It's probably stupid errors but maybe
it's stuff that will be fixed at the same time.

Have a nice day,
-- 
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/




More information about the talk mailing list