mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-23 08:32:42 +00:00
Merge remote-tracking branch 'gh/pr/686/merge'
This commit is contained in:
commit
efdedcd74e
|
@ -3072,7 +3072,7 @@ rt_raster_gdal_rasterize(
|
|||
double _w[2] = {0};
|
||||
|
||||
/* raster is already aligned */
|
||||
if (FLT_EQ(*grid_xw, extent.UpperLeftX) && FLT_EQ(*grid_yw, extent.UpperLeftY)) {
|
||||
if (DBL_EQ(*grid_xw, extent.UpperLeftX) && DBL_EQ(*grid_yw, extent.UpperLeftY)) {
|
||||
RASTER_DEBUG(3, "Skipping raster alignment as it is already aligned to grid");
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -158,3 +158,17 @@ ORDER BY 1, 2, 3, 4, 5, 6, 8;
|
|||
DROP TABLE IF EXISTS geom_clip;
|
||||
DROP TABLE IF EXISTS raster_clip;
|
||||
DROP TABLE IF EXISTS raster_clip_out;
|
||||
|
||||
-- #5148 mask raster not aligned to input raster
|
||||
SELECT
|
||||
ST_UpperLeftX(rast) AS x,
|
||||
ST_UpperLeftY(rast) AS y,
|
||||
ST_Width(rast) AS w,
|
||||
ST_Height(rast) AS h
|
||||
FROM ST_Clip(
|
||||
ST_AddBand(
|
||||
ST_MakeEmptyRaster(100, 100, 0, 0.001, 1e-5, -1e-5, 0, 0, 0),
|
||||
1, '8BUI', 1, 0
|
||||
),
|
||||
ST_GeomFromText('POLYGON((0 0.0009999, 0.0001 0.0009999, 0.0001 0.0009, 0 0.0009, 0 0.0009999))')
|
||||
) AS rast;
|
||||
|
|
|
@ -524,3 +524,4 @@
|
|||
4|2|5|3|4|2|3|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1))
|
||||
4|2|5|3|4|3|3|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2))
|
||||
4|2|5|3|4|4|3|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3))
|
||||
0|0.001|10|10
|
||||
|
|
Loading…
Reference in a new issue