[postgis-users] Detecting wrong geometries

Andrea Peri aperi2007 at gmail.com
Thu Aug 12 09:51:17 PDT 2010


Hi,

I needed to test a shapefile to find eventually wrong geometries.

My first idea was to use postgis to do a
select *from table_from_shapefile where ST_IsValid(geom)=false;

So I load the shapefile with shp2pgsql in postgis (1.5.1)
and do this query.
The results was 1 only geometry wrong.

After some days I repeat the same test with Grass.

Grass with my big surprise report me more geometry wrong.
Infact in the shapefile was detected many geometries with wrong orientation.

Now my question is why this was not detected from postgis ?
I don't know why,
but my idea is that perhaps shp2pgsql, when find a geometry wrong oriented
correct it automatically .

Is this correct ?

Thx,

Andrea Peri.


-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100812/d178cef5/attachment.html>


More information about the postgis-users mailing list