[postgis-tickets] [PostGIS] #3730: [raster] ST_Clip fails when polygon barely intersects with raster
PostGIS
trac at osgeo.org
Sat Mar 25 21:48:00 PDT 2017
#3730: [raster] ST_Clip fails when polygon barely intersects with raster
-------------------------+---------------------------
Reporter: yosukesabai | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.3.3
Component: postgis | Version: 2.3.x
Keywords: |
-------------------------+---------------------------
It would be better if this returns one pixel, or nothing at all.
Currently it throws ERROR and I found hard to handle the error in PG/SQL.
{{{
SELECT ST_Summary(
ST_Clip(
ST_AddBand(
ST_MakeEmptyRaster(16, 16, 0, 0, 1, 1, 0, 0),
ARRAY[
ROW(1, '8BUI'::text, 0, 255),
ROW(2, '8BUI'::text, 0, 255),
ROW(3, '8BUI'::text, 0, 255)
]::addbandarg[]
)
-- this works
--, ST_GeomFromText('POLYGON((15.999999 15.999999, 15.999999 17, 17
17, 17 15.999999, 15.999999 15.999999))')
-- this fails
, ST_GeomFromText('POLYGON((15.9999999 15.9999999, 15.9999999 17, 17
17, 17 15.9999999, 15.9999999 15.9999999))')
)
);
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3730>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list