[postgis-users] raster & polygon intersection error

Phil Hurvitz phurvitz at uw.edu
Tue Dec 1 18:54:40 PST 2015


Hi all, I've got a raster table and a polygon table, and I am trying to 
get the intersection between the two. A bit of the SQL is


SELECT studyid
, st_intersection(a.the_geom_2926, r.rast) AS geomval
FROM (
     SELECT studyid
         , the_geom_2926
     FROM buffers
     -- test on one location
     WHERE studyid = 'pat1020'
) AS a
, rslope_usgs_gt8pct as r
WHERE st_intersects(a.the_geom_2926, r.rast)


I get an error message:
ERROR:  GEOSIntersects: TopologyException: side location conflict at 
1251947.8569092923 201701.02349212748
CONTEXT:  PL/pgSQL function _st_intersects(geometry,raster,integer) line 
22 at RETURN
PL/pgSQL function st_intersection(geometry,raster,integer) line 5 at 
assignment
********** Error **********

ERROR: GEOSIntersects: TopologyException: side location conflict at 
1251947.8569092923 201701.02349212748
SQL state: XX000
Context: PL/pgSQL function _st_intersects(geometry,raster,integer) line 
22 at RETURN
PL/pgSQL function st_intersection(geometry,raster,integer) line 5 at 
assignment


I have checked the validity of the buffer polygons and PostGIS reports 
no errors.

Any idea why the intersection is not working?


PostgreSQL version:
PostgreSQL 9.4.5 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 
4.4.7 20120313 (Red Hat 4.4.7-11), 64-bit

PostGIS version:
POSTGIS="2.2.0 r14208" GEOS="3.5.0-CAPI-1.9.0 r4084" PROJ="Rel. 4.7.1, 
23 September 2009" GDAL="GDAL 1.11.2, released 2015/02/10" 
LIBXML="2.7.6" RASTER


Thanks for any assistance!
-- 
-P.

**************************************************************
Philip M. Hurvitz, PhD | Research Assistant Professor | UW-CBE
Urban Form Lab  | 1107 NE 45th Street, Suite 535  | Box 354802
University of Washington, Seattle, Washington  98195-4802, USA
phurvitz at u.washington.edu | http://gis.washington.edu/phurvitz
"What is essential is invisible to the eye." -de Saint-Exupéry
**************************************************************


More information about the postgis-users mailing list