[postgis-tickets] r16942 - [raster] Fix envelope Contains shortcut in ST_Clip
Darafei
komzpa at gmail.com
Tue Oct 23 06:05:58 PDT 2018
Author: komzpa
Date: 2018-10-23 06:05:58 -0700 (Tue, 23 Oct 2018)
New Revision: 16942
Modified:
branches/2.4/NEWS
branches/2.4/raster/rt_pg/rtpostgis.sql.in
Log:
[raster] Fix envelope Contains shortcut in ST_Clip
Patch by Sai-bot
Closes #3457
Modified: branches/2.4/NEWS
===================================================================
--- branches/2.4/NEWS 2018-10-23 13:00:11 UTC (rev 16941)
+++ branches/2.4/NEWS 2018-10-23 13:05:58 UTC (rev 16942)
@@ -10,6 +10,7 @@
- #4191, Fix undefined behaviour in ptarray_clone_deep (Raúl Marín)
- #4020, Fix leftovers in topology upgrade from 2.1 (Sandro Santilli)
- #4206, Fix support for PostgreSQL 12 dev branch (Laurenz Albe)
+ - #3457, Fix raster envelope shortcut in ST_Clip (Sai-bot)
PostGIS 2.4.5
Modified: branches/2.4/raster/rt_pg/rtpostgis.sql.in
===================================================================
--- branches/2.4/raster/rt_pg/rtpostgis.sql.in 2018-10-23 13:00:11 UTC (rev 16941)
+++ branches/2.4/raster/rt_pg/rtpostgis.sql.in 2018-10-23 13:05:58 UTC (rev 16942)
@@ -6701,7 +6701,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