- #4191, Fix undefined behaviour in ptarray_clone_deep (Raúl Marín)
- #4211, Fix ST_Subdivide for minimal exterior ring with minimal hole (Darafei
Praliaskouski)
+ - #3457, Fix raster envelope shortcut in ST_Clip (Sai-bot)
PostGIS 2.5.0
2018/09/23
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 ~ @extschema@.ST_Envelope(rast) THEN
+ IF (nodataval IS NULL OR array_length(nodataval, 1) < 1) AND @extschema@.ST_Contains(geom, @extschema@.ST_Envelope(rast)) THEN
RETURN rast;
END IF;
-- #4102 negative nodata values don't apply on Raspberry Pi
SELECT '#4102.1', ST_BandNoDataValue(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 1, -1, 0, 0, 0), 1, '16BSI', 0, -10), 1) AS rast;
SELECT '#4102.2', ST_BandNoDataValue(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 1, -1, 0, 0, 0), 1, '32BSI', 0, -10), 1) AS rast;
+
+select '#3457', ST_Area((ST_DumpAsPolygons(ST_Clip(ST_ASRaster(ST_GeomFromText('POLYGON((0 0,100 0,100 100,0 100,0 0))',4326),ST_Addband(ST_MakeEmptyRaster(1,1,0,0,1,-1,0,0,4326),'32BF'::text,0,-1),'32BF'::text,1,-1), ST_GeomFromText('POLYGON((0 0,100 100,100 0,0 0))',4326)))).geom);