From: Bborie Park Date: Thu, 18 Oct 2012 21:45:33 +0000 (+0000) Subject: Clamp SRID when comparing SRIDs of raster vs geometry for geomval X-Git-Tag: 2.1.0beta2~507 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=085b0d3dfbecee62ba506b8bd42361e7638d9f2d;p=postgis Clamp SRID when comparing SRIDs of raster vs geometry for geomval variant of ST_SetValues() git-svn-id: http://svn.osgeo.org/postgis/trunk@10469 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/raster/rt_pg/rt_pg.c b/raster/rt_pg/rt_pg.c index 0cf2b7900..164575476 100644 --- a/raster/rt_pg/rt_pg.c +++ b/raster/rt_pg/rt_pg.c @@ -3540,7 +3540,7 @@ Datum RASTER_setPixelValuesGeomval(PG_FUNCTION_ARGS) numbands = rt_raster_get_num_bands(raster); width = rt_raster_get_width(raster); height = rt_raster_get_height(raster); - srid = rt_raster_get_srid(raster); + srid = clamp_srid(rt_raster_get_srid(raster)); rt_raster_get_geotransform_matrix(raster, gt); /* nband */ @@ -3652,7 +3652,7 @@ Datum RASTER_setPixelValuesGeomval(PG_FUNCTION_ARGS) } /* check SRID */ - if (gserialized_get_srid(gser) != srid) { + if (clamp_srid(gserialized_get_srid(gser)) != srid) { elog(NOTICE, "Geometry provided for geomval at index %d does not have the same SRID as the raster: %d. Returning original raster", i, srid); rtpg_setvaluesgv_arg_destroy(arg); rt_raster_destroy(raster);