]> granicus.if.org Git - postgis/commitdiff
Fixed optimization bug in 1-raster ST_MapAlgebraExpr. Ticket is #1515.
authorBborie Park <bkpark at ucdavis.edu>
Fri, 3 Feb 2012 18:09:27 +0000 (18:09 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Fri, 3 Feb 2012 18:09:27 +0000 (18:09 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9017 b70326c6-7e19-0410-871a-916f4a2858ee

raster/rt_pg/rt_pg.c
raster/test/regress/rt_mapalgebraexpr_expected

index 83fe02e674f4a6fa88265d917e1610d16fb4b1bd..cf69cd1dbd27b8ecb42bae65df66f2289cf99b04 100644 (file)
@@ -2797,7 +2797,7 @@ Datum RASTER_mapAlgebraExpr(PG_FUNCTION_ARGS)
         POSTGIS_RT_DEBUGF(4, "RASTER_mapAlgebraExpr: New raster has %d bands",
                 rt_raster_get_num_bands(newrast));
 
-        rt_raster_copy_band(raster, newrast, nband - 1, 0);
+        rt_raster_copy_band(newrast, raster, nband - 1, 0);
 
         POSTGIS_RT_DEBUGF(4, "RASTER_mapAlgebraExpr: New raster now has %d bands",
                 rt_raster_get_num_bands(newrast));
index d89238726b9ddb8f6cc32c50bbcc9d541d224a56..3478afd0fc82abb67aeeb06a4171366a0d33f45e 100644 (file)
@@ -7,9 +7,7 @@ T2|t
 T3||19
 T4||2
 T5||2
-NOTICE:  rt_raster_copy_band: Second raster has no band
-NOTICE:  Could not find raster band of index 1 when getting pixel value. Returning NULL
-T6||
+T6||-1
 T7|100|
 T8|100|120
 T9|101|