]> granicus.if.org Git - postgis/commitdiff
-Fixxed a bug getting toindex band index
authorPierre Racine <Pierre.Racine@sbf.ulaval.ca>
Thu, 24 Mar 2011 22:56:55 +0000 (22:56 +0000)
committerPierre Racine <Pierre.Racine@sbf.ulaval.ca>
Thu, 24 Mar 2011 22:56:55 +0000 (22:56 +0000)
-Classified one function declaration

git-svn-id: http://svn.osgeo.org/postgis/trunk@6967 b70326c6-7e19-0410-871a-916f4a2858ee

raster/rt_pg/rt_pg.c

index decb44a2a887ca01a0d1d7ed6ddadb2214b5389e..70407805b5f660ebf63e731f22db05e68b4794f7 100644 (file)
@@ -109,7 +109,6 @@ Datum RASTER_getBandPixelType(PG_FUNCTION_ARGS);
 Datum RASTER_getBandPixelTypeName(PG_FUNCTION_ARGS);
 Datum RASTER_getBandNoDataValue(PG_FUNCTION_ARGS);
 Datum RASTER_getBandPath(PG_FUNCTION_ARGS);
-Datum RASTER_getPixelValue(PG_FUNCTION_ARGS);
 Datum RASTER_bandIsNoData(PG_FUNCTION_ARGS);
 Datum RASTER_isEmpty(PG_FUNCTION_ARGS);
 Datum RASTER_hasNoBand(PG_FUNCTION_ARGS);
@@ -118,6 +117,9 @@ Datum RASTER_hasNoBand(PG_FUNCTION_ARGS);
 Datum RASTER_setBandIsNoData(PG_FUNCTION_ARGS);
 Datum RASTER_setBandNoDataValue(PG_FUNCTION_ARGS);
 
+/* Get pixel value */
+Datum RASTER_getPixelValue(PG_FUNCTION_ARGS);
+
 /* Set pixel value */
 Datum RASTER_setPixelValue(PG_FUNCTION_ARGS);
 
@@ -1890,7 +1892,7 @@ Datum RASTER_copyband(PG_FUNCTION_ARGS)
         if (PG_ARGISNULL(3))
             toindex = oldtorastnumbands + 1;
         else
-            toindex = PG_GETARG_UINT16(2);
+            toindex = PG_GETARG_UINT16(3);
 
         /* Copy band fromrast torast */
         newbandindex = rt_raster_copy_band(ctx, torast, fromrast, fromband - 1, toindex - 1);