[postgis-tickets] r15456 - Change ST_Clip from Error to Notice when ST_Clip can compute no band

Regina Obe lr at pcorp.us
Fri Jun 23 21:57:55 PDT 2017


Author: robe
Date: 2017-06-23 21:57:54 -0700 (Fri, 23 Jun 2017)
New Revision: 15456

Modified:
   trunk/raster/rt_pg/rtpg_mapalgebra.c
Log:
Change ST_Clip from Error to Notice when ST_Clip can compute no band
References #3730 for PostGIS 2.4

Modified: trunk/raster/rt_pg/rtpg_mapalgebra.c
===================================================================
--- trunk/raster/rt_pg/rtpg_mapalgebra.c	2017-06-24 04:34:19 UTC (rev 15455)
+++ trunk/raster/rt_pg/rtpg_mapalgebra.c	2017-06-24 04:57:54 UTC (rev 15456)
@@ -520,8 +520,8 @@
 	int num;
 	int *maskDims;
 	int x,y;
-	
 
+
 	int i = 0;
 	int noerr = 0;
 	int allnull = 0;
@@ -662,7 +662,7 @@
 			rtpg_nmapalgebra_arg_destroy(arg);
 			PG_RETURN_NULL();
 		}
-	
+
 		maskDims = ARR_DIMS(maskArray);
 
 		if (maskDims[0] % 2 == 0 || maskDims[1] % 2 == 0) {
@@ -670,7 +670,7 @@
 			rtpg_nmapalgebra_arg_destroy(arg);
 			PG_RETURN_NULL();
 		}
-	
+
 		deconstruct_array(
 			maskArray,
 			etype,
@@ -742,7 +742,7 @@
 	}
 
 	noerr = 1;
-	
+
 	/* all rasters are empty, return empty raster */
 	if (allempty == arg->numraster) {
 		elog(NOTICE, "All input rasters are empty. Returning empty raster");
@@ -2855,7 +2855,7 @@
 		) {
 			rt_raster_destroy(_raster);
 		}
-			
+
 		for (j = 0; j < iwr->bandarg[i].numraster; j++) {
 			if (iwr->bandarg[i].raster[j] == NULL)
 				continue;
@@ -3395,7 +3395,7 @@
 				rt_raster_destroy(_raster);
 				rt_raster_destroy(rtn);
 				PG_FREE_IF_COPY(pgraster, 0);
-				elog(ERROR, "RASTER_clip: Could not get band from working raster");
+				elog(NOTICE, "RASTER_clip: Could not get band from working raster");
 				PG_RETURN_NULL();
 			}
 
@@ -4272,7 +4272,7 @@
 						/* get the band stats */
 						if (arg->bandstats == NULL) {
 							POSTGIS_RT_DEBUG(4, "Getting band stats");
-							
+
 							arg->bandstats = rt_band_get_summary_stats(arg->band, 1, 1, 0, NULL, NULL, NULL);
 							if (arg->bandstats == NULL) {
 								pfree(_element);



More information about the postgis-tickets mailing list