From fcdc4c083e66a7232a812e31f9271a5c220dde45 Mon Sep 17 00:00:00 2001 From: Bborie Park Date: Mon, 29 Oct 2012 22:23:23 +0000 Subject: [PATCH] Added SRID check to ST_Neighborhood(raster, geometry) git-svn-id: http://svn.osgeo.org/postgis/trunk@10586 b70326c6-7e19-0410-871a-916f4a2858ee --- raster/rt_pg/rtpostgis.sql.in.c | 5 +++++ 1 file changed, 5 insertions(+) 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); -- 2.40.0