[postgis-users] Intersection() error FIXED!!

Gustavo Martinez gumartin at mecon.gov.ar
Tue Nov 27 12:25:27 PST 2007


Hi Kevin,

I've just tried the ST_Snaptogrid() function and the problem was fixed.
Many thanks,

Gustavo

El Monday 26 November 2007 15:42:27 escribió:
> 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



-- 
Lic. Gustavo Martínez
Gestión de Pesquerías
Sub Secretaría de Pesca de la Nación
Paseo Colón 982, Anexo Jardín Pesca
Tel: (54) 11 43492165
Buenos Aires, República Argentina

“Que la tierra se vaya haciendo camino ante tus pasos,
que el viento sople siempre a tus espaldas,
que el sol brille cálido sobre tu cara,
que la lluvia caiga suavemente sobre tus campos y,
hasta tanto volvamos a encontrarnos,
que Dios te lleve en la palma de su mano.”



More information about the postgis-users mailing list