From: Bborie Park Date: Mon, 29 Oct 2012 22:23:23 +0000 (+0000) Subject: Added SRID check to ST_Neighborhood(raster, geometry) X-Git-Tag: 2.1.0beta2~440 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fcdc4c083e66a7232a812e31f9271a5c220dde45;p=postgis Added SRID check to ST_Neighborhood(raster, geometry) git-svn-id: http://svn.osgeo.org/postgis/trunk@10586 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/raster/rt_pg/rtpostgis.sql.in.c b/raster/rt_pg/rtpostgis.sql.in.c index c73028127..3257438d5 100644 --- a/raster/rt_pg/rtpostgis.sql.in.c +++ b/raster/rt_pg/rtpostgis.sql.in.c @@ -5613,6 +5613,11 @@ CREATE OR REPLACE FUNCTION st_neighborhood( IF (st_geometrytype($3) != 'ST_Point') THEN RAISE EXCEPTION 'Attempting to get the neighbor of a pixel with a non-point geometry'; END IF; + + IF ST_SRID(rast) != ST_SRID(pt) THEN + RAISE EXCEPTION 'Raster and geometry do not have the same SRID'; + END IF; + wx := st_x($3); wy := st_y($3);