[postgis-users] Finding a TopologyException

Ben Madin lists at remoteinformation.com.au
Mon Feb 15 16:53:46 PST 2010


Thanks Martin,

I was thinking it might be something like that. 

cheers

Ben


On 16/02/2010, at 8:40 , Martin Davis wrote:

> JTS/GEOS can sometimes does some internal transformation of  geometries to try and overcome robustness errors.  So the coordinates in TopologyException error messages may not always correspond to the coordinate system of the input geometries.
> 
> Ben Madin wrote:
>> G'day all,
>> 
>> I have a topology exception with a file I clean up with GRASS and exported back into PostGIS, which I discovered when I tried to merge provinces into countries:
>> 
>> CREATE TABLE new_country AS 	SELECT country::varchar(3), st_union(the_geom) as the_geom
>> 	FROM new_prov
>> 	GROUP BY country;
>> 
>> 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
>> 
>> There is obviously information here on where the problem lies, but my entire project is in Lat / Long (EPSG:4326) in South East Asia, so I'm guessing this is not (nor is it on a unit square)
>> 
>> So :
>> 
>> 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.
>> 
>> (as an aside, changing the query to st_union(st_buffer(the_geom,0)) let it through (and it works as I wanted)
>> 
>> cheers
>> 
>> Ben
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>> 
>>  
> 
> -- 
> Martin Davis
> Senior Technical Architect
> Refractions Research, Inc.
> (250) 383-3022
> 
> _______________________________________________
> 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