[postgis-users] Finding a TopologyException

Ben Madin lists at remoteinformation.com.au
Mon Feb 15 16:25:47 PST 2010


Thanks for the feedback

st_isvalid identified two crosses in the South of Vietnam - it was a crossing from an unexpected polygon (squeezed in between two provinces, never more than a few metres wide, and masquerading as a province that actually is in the North (of Vietnam). I can only assume that it was an artefact from GRASS, maybe I didn't remove big enough areas.

Steve, There was nothing on the prime meridian / equator boundary, hence my wondering about what the coordinates of the line mean.

Thanks again

cheers

Ben


On 15/02/2010, at 22:59 , Stephen Woodbridge wrote:

> strk wrote:
>> On Mon, Feb 15, 2010 at 03:51:40PM +0800, Ben Madin wrote:
>>> NOTICE:  TopologyException: found non-noded intersection between LINESTRING (-0.204257 0.999226, -0.204257 0.99858) and LINESTRING (-0.204257 0.995743, -0.204257 0.999226) at -0.204257 0.999226
>>> How does the coordinates returned by the error relate to my geometry? or What do they mean? Can I use this information to find the problem part of the geometry.
>> Often such problems are due to invalid geometries in input.
>> What you could do is:
>> 	SELECT gid, ST_isValidReason(the_geom) where NOT ST_isValid(the_geom);
>> That should give you more usable informations.
>> Even better, the trunk version of postgis has an ST_isValidDetail which also
>> gives you the problematic point as a Geometry.
> 
> You might also check to see if you have same geometries located near the exception with:
> 
> select * from "table" where ST_expand(setsrid(makepoint(-0.204257,0.999226),4326), 0.001) && the_geom;
> 
> -Steve W
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list