[postgis-users] Intersection() error

Kevin Neufeld kneufeld at refractions.net
Mon Nov 26 10:42:27 PST 2007


Hi Gustavo,

I'm not sure if this is the problem, but I noticed that your outer ring 
has duplicate vertices at POINT (-66.4346288594015 -54.1775308194424).

Typically, the error you're seeing is the result of a pair of really 
close vertices.  You could try putting your geometries through the 
snaptogrid function and snap to some reasonable precision grid.

If you are still having problems, try to isolate the problem further by 
identifying the second geometry that when used with the geometry you 
posted caused the error.
-- Kevin

Gustavo Martinez wrote:
> As you can see in the select clause, I use different polygons. The one that 
> causes the error is the last one. I paste the WKT def.
>
> Gustavo
>
> El Monday 26 November 2007 14:25:32 escribió:
>   
>> Are your input geometries valid?
>>
>> We're going to need more information if we're to help you.  Perhaps
>> isolate the two geometries that are causing the error and if they are
>> small enough, post the WKT representation here.
>>
>> -- Kevin
>>
>> Gustavo Martinez wrote:
>>     
>>> Hi,
>>>
>>> I am trying to calculate the area of the intersection of several polygons
>>> with the following query:
>>>
>>> select idrectangulos, nro_rct, area(geom)/1000000 as total,
>>> area(st_intersection(geom,(select geom from zonas where cat=9)))/1000000
>>> as rio,
>>> area(st_intersection(geom,(select geom from zonas where cat=1)))/1000000
>>> as zcp,
>>> area(st_intersection(geom,(select geom from zonas where cat=3)))/1000000
>>> as zee,
>>> area(st_intersection(geom,(select geom from zonas where cat=2)))/1000000
>>> as pcia
>>> from rectangulos
>>>
>>> However, I got the following error:
>>>
>>> NOTICE:  TopologyException: no outgoing dirEdge found
>>> (-68.3024,-52.6125,-52.6125)
>>>
>>> ERROR:  GEOS Intersection() threw an error!
>>>
>>> How can I handle this?
>>> Thanks
>>>
>>>
>>> Gustavo
>>>       



More information about the postgis-users mailing list