[OSM-dev] invalid geometry in planet_polygon
jukka.rahkonen at latuviitta.fi
Tue Aug 24 05:25:21 BST 2010
Usually they are data errors. Finland.osm seems to have 65 such errors. A
fast way to have a look at the faulty geometries is to run the SQL query
with OpenJUMP. Use the Run Datastore Query option and run your query as
select asbinary(way), osm_id from planet_osm_polygon WHERE NOT
Then you can use OpenJUMP QA tools for finding out where the error exactly
> I tried some queries filtered with st_within and got a geos exception.
> I think it's caused by some geometries not being valid.
> Database is a standard mapnik import done by osm2pgsql.
> Postgis reports
> NOTICE: Self-intersection at or near point 1.1195e+07 2.01783e+06
> This is relation 227259
> Is this a problem with the import of osm2pgsql or a problem with the data?
> I used this query to detect invalid geometries. There are more...
> select osm_id from planet_osm_polygon WHERE NOT st_isvalid(way)
> A dump of the invalid geometries of the planet is available on my server:
> dev mailing list
> dev at openstreetmap.org
More information about the dev