[postgis-tickets] r16944 - [raster] Fix envelope Contains shortcut in ST_Clip

Darafei komzpa at gmail.com
Tue Oct 23 06:07:48 PDT 2018


Author: komzpa
Date: 2018-10-23 06:07:47 -0700 (Tue, 23 Oct 2018)
New Revision: 16944

Modified:
   branches/2.2/raster/rt_pg/rtpostgis.sql.in
Log:
[raster] Fix envelope Contains shortcut in ST_Clip

Patch by Sai-bot

Closes #3457


Modified: branches/2.2/raster/rt_pg/rtpostgis.sql.in
===================================================================
--- branches/2.2/raster/rt_pg/rtpostgis.sql.in	2018-10-23 13:07:29 UTC (rev 16943)
+++ branches/2.2/raster/rt_pg/rtpostgis.sql.in	2018-10-23 13:07:47 UTC (rev 16944)
@@ -6654,7 +6654,7 @@
  	AS $$
 	BEGIN
 		-- short-cut if geometry's extent fully contains raster's extent
-		IF (nodataval IS NULL OR array_length(nodataval, 1) < 1) AND geom ~ ST_Envelope(rast) THEN
+		IF (nodataval IS NULL OR array_length(nodataval, 1) < 1) AND ST_Contains(geom, ST_Envelope(rast)) THEN
 			RETURN rast;
 		END IF;
 



More information about the postgis-tickets mailing list