[postgis-users] Intersects() error

strk at refractions.net strk at refractions.net
Tue Jan 24 04:28:57 PST 2006


The two queries are very different.
Intersects() involves GEOS usage, and tests for *real*,
topological intersection, rather then bounding box overlap.

If those geometries are valid (check isValid()) a likely
reason for the exception is GEOS/JTS algorightm not being
completely robust. You can sometimes work around this by
reducing their precision (check SnapToGrid()).

Dependin on GEOS version you might have more or less robustness
available. Latest GEOS release is a port of JTS-1.4 plus port
of some bug fixes from subsequent releases.

Getting GEOS in sync with JTS-1.7 will reduce these cases.

--strk;


On Mon, Jan 23, 2006 at 03:50:37PM -0500, Gilbert, Antoine wrote:
> Hi
> 
>  
> 
> When I use a simple bbox intersects query like this, all is ok :
> 
>  
> 
> SELECT AsBinary (geom)  as geom, GeometryType( geom) as
> _pgGeometryTypeAlias FROM(select * from "can_nad27_region") as foo WHERE
> (GeomFromText('POLYGON((-62.048854187348795 46.80208227121052,
> -64.80640318784656 51.480318104127846, -69.24339730246844
> 52.96374353310841, -73.24748751348027 52.96374353310841,
> -77.68448162810215 51.480318104127846, -80.44203062859991
> 46.80208227121052, -77.43144917490224 42.30768527650847,
> -73.23675825984627 40.673442256588125, -69.25412655610243
> 40.673442256588125, -65.0594356410465 42.307685276508444,
> -62.048854187348795 46.80208227121052))',SRID(geom)) && geom)
> 
>  
> 
> But when I had an Intersects() condition on the exactly sames polygons I
> have an error :
> 
>  
> 
>  
> 
> SELECT AsBinary (geom)  as geom, GeometryType( geom) as
> _pgGeometryTypeAlias FROM(select * from "can_nad27_region") as foo WHERE
> (GeomFromText('POLYGON((-62.048854187348795 46.80208227121052,
> -64.80640318784656 51.480318104127846, -69.24339730246844
> 52.96374353310841, -73.24748751348027 52.96374353310841,
> -77.68448162810215 51.480318104127846, -80.44203062859991
> 46.80208227121052, -77.43144917490224 42.30768527650847,
> -73.23675825984627 40.673442256588125, -69.25412655610243
> 40.673442256588125, -65.0594356410465 42.307685276508444,
> -62.048854187348795 46.80208227121052))',SRID(geom)) && geom) AND
> Intersects(GeomFromText('POLYGON((-62.048854187348795 46.80208227121052,
> -64.80640318784656 51.480318104127846, -69.24339730246844
> 52.96374353310841, -73.24748751348027 52.96374353310841,
> -77.68448162810215 51.480318104127846, -80.44203062859991
> 46.80208227121052, -77.43144917490224 42.30768527650847,
> -73.23675825984627 40.673442256588125, -69.25412655610243
> 40.673442256588125, -65.0594356410465 42.307685276508444,
> -62.048854187348795 46.80208227121052))',SRID(geom)), geom)
> 
>  
> 
> NOTICE:  TopologyException: side location conflict (-110,75.8445)
> 
>  
> 
> ERROR:  GEOS intersects() threw an error!
> 
>  
> 
> Any idea?
> 
>  
> 
> Antoine
> 

> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users


-- 

 /"\    ASCII Ribbon Campaign
 \ /    Respect for low technology.
  X     Keep e-mail messages readable by any computer system.
 / \    Keep it ASCII. 




More information about the postgis-users mailing list