[postgis-users] ERROR: geometry contains non-closed rings

Mr. Puneet Kishor punk.kish at gmail.com
Fri Aug 19 03:06:27 PDT 2011


On Aug 19, 2011, at 10:26 AM, Mr. Puneet Kishor wrote:

> Ben,
> 
> On Aug 18, 2011, at 10:04 PM, Ben Madin wrote:
> 
>> SELECT gid, st_isvalidreason(the_geom), st_summary(the_geom) FROM data WHERE st_isclosed(the_geom) is FALSE;
> 
> 
> I am not entirely sure what the above was supposed to accomplish (I am assuming it would have given me the reason for features being invalid), however, I ran the query and I got 0 (zero) rows.
> 

hmmmm.... a bit more on the above

SELECT Count(*) FROM data WHERE ST_IsClosed(the_geom) IS FALSE;
0 rows

SELECT Count(*) FROM data WHERE ST_IsValid(the_geom) IS FALSE;
NOTICE:  IllegalArgumentException: Points of LinearRing do not form a closed linestring
NOTICE:  IllegalArgumentException: Points of LinearRing do not form a closed linestring
NOTICE:  Ring Self-intersection at or near point -125.35 63.3748
NOTICE:  Ring Self-intersection at or near point -105.317 25.7493
NOTICE:  Ring Self-intersection at or near point -79.7995 15.6005
NOTICE:  Ring Self-intersection at or near point -108.085 29.1395
NOTICE:  Ring Self-intersection at or near point -110.182 25.8712
NOTICE:  Self-intersection at or near point -119.188 77.3311
NOTICE:  Ring Self-intersection at or near point -120.647 48.8028
NOTICE:  Ring Self-intersection at or near point -124.845 61.0461
NOTICE:  Ring Self-intersection at or near point -100.63 62.7163
NOTICE:  Self-intersection at or near point -69.7338 64.1648
NOTICE:  Self-intersection at or near point -69.2501 58.2279
NOTICE:  Self-intersection at or near point -65.9125 52.0649
NOTICE:  Ring Self-intersection at or near point -74.8998 50.7265
NOTICE:  Self-intersection at or near point -82.6883 72.1031
NOTICE:  Ring Self-intersection at or near point -27.1663 71.0088
NOTICE:  Ring Self-intersection at or near point -99.0254 23.1045
NOTICE:  Ring Self-intersection at or near point -93.6802 37.1155
NOTICE:  Ring Self-intersection at or near point -73.2305 9.59044
NOTICE:  Ring Self-intersection at or near point -63.4384 13.1596
21 rows

SELECT gid, ST_IsValidReason(the_geom) FROM data WHERE ST_isvalid(the_geom) IS FALSE;
NOTICE:  IllegalArgumentException: Points of LinearRing do not form a closed linestring
NOTICE:  IllegalArgumentException: Points of LinearRing do not form a closed linestring


ERROR:  POSTGIS2GEOS conversion failed

********** Error **********

ERROR: POSTGIS2GEOS conversion failed
SQL state: XX000




More information about the postgis-users mailing list