Commit ffc47387 authored by Regina Obe's avatar Regina Obe

#3315: fix typos in error messages for map algebra mask and provide more...

#3315: fix typos in error messages for map algebra mask and provide more descriptive error about dimension mismatch

git-svn-id: http://svn.osgeo.org/postgis/trunk@14185 b70326c6-7e19-0410-871a-916f4a2858ee
parent 2fd19d90
Pipeline #164925 skipped
......@@ -311,8 +311,8 @@ rt_errorstate rt_pixel_set_to_array(
/* make sure that the dimx and dimy match mask */
if( mask != NULL) {
if ( dim[0] != mask-> dimx || dim[1] != mask->dimy ){
rterror("rt_pixel_set_array: mask dimentions do not match given dims");
if ( dim[0] != mask->dimx || dim[1] != mask->dimy ){
rterror("rt_pixel_set_array: mask dimensions %d x %d do not match given dims %d x %d", mask->dimx, mask->dimy, dim[0], dim[1]);
return ES_ERROR;
}
......
......@@ -652,14 +652,14 @@ Datum RASTER_nMapAlgebra(PG_FUNCTION_ARGS)
break;
default:
rtpg_nmapalgebra_arg_destroy(arg);
elog(ERROR,"RASTER_nMapAlgerbra: Mask data type must be FLOAT8 or FLOAT4.");
elog(ERROR,"RASTER_nMapAlgebra: Mask data type must be FLOAT8 or FLOAT4.");
PG_RETURN_NULL();
}
ndims = ARR_NDIM(maskArray);
if( ndims != 2 ){
elog(ERROR, "RASTER_nMapAlgerbra: Mask Must be a 2D array.");
elog(ERROR, "RASTER_nMapAlgebra: Mask Must be a 2D array.");
rtpg_nmapalgebra_arg_destroy(arg);
PG_RETURN_NULL();
}
......@@ -668,7 +668,7 @@ Datum RASTER_nMapAlgebra(PG_FUNCTION_ARGS)
if ( maskDims[0] % 2 == 0 || maskDims[1] % 2 == 0 ){
elog(ERROR,"RASTER_nMapAlgerbra: Mask dimenstions must be odd.");
elog(ERROR,"RASTER_nMapAlgebra: Mask dimensions must be odd.");
rtpg_nmapalgebra_arg_destroy(arg);
PG_RETURN_NULL();
}
......@@ -685,7 +685,7 @@ Datum RASTER_nMapAlgebra(PG_FUNCTION_ARGS)
pfree(maskElements);
pfree(maskNulls);
}
elog(ERROR, "RASTER_nMapAlgerbra: Could not deconstruct new values array.");
elog(ERROR, "RASTER_nMapAlgebra: Could not deconstruct new values array.");
rtpg_nmapalgebra_arg_destroy(arg);
PG_RETURN_NULL();
}
......@@ -719,7 +719,7 @@ Datum RASTER_nMapAlgebra(PG_FUNCTION_ARGS)
i++;
}
}
/*set mask dimenstions*/
/*set mask dimensions*/
arg->mask->dimx = maskDims[0];
arg->mask->dimy = maskDims[1];
if ( maskDims[0] == 1 && maskDims[1] == 1){
......
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
ERROR: RASTER_nMapAlgerbra: Mask dimenstions must be odd.
ERROR: RASTER_nMapAlgebra: Mask dimensions must be odd.
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
ERROR: RASTER_nMapAlgerbra: Mask dimenstions must be odd.
ERROR: RASTER_nMapAlgebra: Mask dimensions must be odd.
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
ERROR: RASTER_nMapAlgerbra: Mask dimenstions must be odd.
ERROR: RASTER_nMapAlgebra: Mask dimensions must be odd.
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
NOTICE: All input rasters do not have bands at indicated indexes. Returning empty raster
......@@ -52,10 +52,10 @@ NOTICE: userargs = <NULL>
0100000100000000000000F03F000000000000F0BF000000000000F03F000000000000F0BF0000000000000000000000000000000000000000020002004400FFFFFFFF
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
ERROR: RASTER_nMapAlgerbra: Mask Must be a 2D array.
ERROR: RASTER_nMapAlgebra: Mask Must be a 2D array.
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
ERROR: RASTER_nMapAlgerbra: Mask Must be a 2D array.
ERROR: RASTER_nMapAlgebra: Mask Must be a 2D array.
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
NOTICE: All input rasters do not have bands at indicated indexes. Returning empty raster
......@@ -230,10 +230,10 @@ NOTICE: userargs = <NULL>
0100000100000000000000F03F000000000000F0BF000000000000F03F000000000000F0BF0000000000000000000000000000000000000000020002004400FFFFFFFF
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
ERROR: RASTER_nMapAlgerbra: Mask dimenstions must be odd.
ERROR: RASTER_nMapAlgebra: Mask dimensions must be odd.
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
ERROR: RASTER_nMapAlgerbra: Mask dimenstions must be odd.
ERROR: RASTER_nMapAlgebra: Mask dimensions must be odd.
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
NOTICE: All input rasters do not have bands at indicated indexes. Returning empty raster
......@@ -279,10 +279,10 @@ NOTICE: userargs = <NULL>
0100000100000000000000F03F000000000000F0BF000000000000F03F000000000000F0BF0000000000000000000000000000000000000000020002004400FFFFFFFF
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
ERROR: RASTER_nMapAlgerbra: Mask Must be a 2D array.
ERROR: RASTER_nMapAlgebra: Mask Must be a 2D array.
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
ERROR: RASTER_nMapAlgerbra: Mask Must be a 2D array.
ERROR: RASTER_nMapAlgebra: Mask Must be a 2D array.
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
NOTICE: All input rasters do not have bands at indicated indexes. Returning empty raster
......@@ -457,13 +457,13 @@ NOTICE: userargs = <NULL>
0100000100000000000000F03F000000000000F0BF000000000000F03F000000000000F0BF0000000000000000000000000000000000000000020002004400FFFFFFFF
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
ERROR: RASTER_nMapAlgerbra: Mask dimenstions must be odd.
ERROR: RASTER_nMapAlgebra: Mask dimensions must be odd.
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
ERROR: RASTER_nMapAlgerbra: Mask dimenstions must be odd.
ERROR: RASTER_nMapAlgebra: Mask dimensions must be odd.
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
ERROR: RASTER_nMapAlgerbra: Mask Must be a 2D array.
ERROR: RASTER_nMapAlgebra: Mask Must be a 2D array.
NOTICE: First argument (nband) of rastbandarg at index 0 is NULL. Assuming NULL raster
NOTICE: All input rasters are NULL. Returning NULL
NOTICE: All input rasters do not have bands at indicated indexes. Returning empty raster
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment