[OSM-dev] osm2pgsql invalid polygons

Ramas ieskok at ramuno.lt
Mon May 7 09:25:04 BST 2012


>From user point this relation is correct but from geos point - not. The
problem is that this polygon(and many others) was skipped without any
warnings. You cannot fix it if you dont know where error is.

On 7 May 2012 01:17, Sven Geggus <lists at fuchsschwanzdomain.de> wrote:

> Ramas <ieskok at ramuno.lt> wrote:
>
> > how do you solve problem with skipped invalid polygons?
>
> Fix it in the osm database?
>
> > with error:
> > Self-intersection at or near point 2889220.2400000002 7470212.1299999999
>
> This does not look as a valid polygon to me at leadt in OGC Simple
> Features terms.  This could arguably get fixed in osm2pgsql code
> because it is know how it is meant to be in this case, but it is not
> a valid OGC Simple Features polygon.
>
> Just add an additional way around 160596899 and 160596916 and declare
> this one of type inner.
>
> > I patched osm2pgsql and it allows to import such polygons. Mapnik renders
> > it correctly.
>
> Not a good Idea IMO because there is more than Mapnik and quite a lot
> of the spatial operations in postgis will not work with invalid
> geometries.
>
> >Does we need such validations?
>
> I definitely think we do. If osm2pgsql does import and render invalid
> polygons they will never get fixes in the database.
>
> Sven
>
> --
> Trotz der zunehmenden Verbreitung von Linux erfreut sich der Bär,
> und - dank Knut - insbesondere der Eisbär, deutlich größerer
> Beliebtheit als der Pinguin. (Gefunden bei http://telepolis.de/)
> /me is giggls at ircnet, http://sven.gegg.us/ on the Web
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20120507/ccb48f69/attachment-0001.html>


More information about the dev mailing list