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

Regina Obe lr at pcorp.us
Fri Jun 23 21:58:24 PDT 2017


Author: robe
Date: 2017-06-23 21:58:24 -0700 (Fri, 23 Jun 2017)
New Revision: 15457

Modified:
   branches/2.3/NEWS
   branches/2.3/raster/rt_pg/rtpg_mapalgebra.c
Log:
Change ST_Clip from Error to Notice when ST_Clip can compute no band
Closest #3730 for PostGIS 2.3.3

Modified: branches/2.3/NEWS
===================================================================
--- branches/2.3/NEWS	2017-06-24 04:57:54 UTC (rev 15456)
+++ branches/2.3/NEWS	2017-06-24 04:58:24 UTC (rev 15457)
@@ -17,6 +17,7 @@
   - #3682, Strange fieldlength in result of pgsql2shp
   - #3701, Escape double quotes issue in pgsql2shp
   - #3704, ST_AsX3D crashes on empty geometry
+  - #3730, Change ST_Clip from Error to Notice when ST_Clip can compute no band
 
 
 PostGIS 2.3.2

Modified: branches/2.3/raster/rt_pg/rtpg_mapalgebra.c
===================================================================
--- branches/2.3/raster/rt_pg/rtpg_mapalgebra.c	2017-06-24 04:57:54 UTC (rev 15456)
+++ branches/2.3/raster/rt_pg/rtpg_mapalgebra.c	2017-06-24 04:58:24 UTC (rev 15457)
@@ -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");
@@ -2858,7 +2858,7 @@
 		) {
 			rt_raster_destroy(_raster);
 		}
-			
+
 		for (j = 0; j < iwr->bandarg[i].numraster; j++) {
 			if (iwr->bandarg[i].raster[j] == NULL)
 				continue;
@@ -3398,7 +3398,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();
 			}
 
@@ -4275,7 +4275,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