Opened 3 years ago

Last modified 18 months ago

#2586 new defect

[raster] ST_Clip with geometry smaller than pixel size

Reported by: dustymugs Owned by: dustymugs
Priority: high Milestone: PostGIS 2.1.9
Component: raster Version: 2.1.x
Keywords: Cc:


When using a geometry smaller than a single pixel, such as from the raster linked below, the returned raster from ST_Clip has no value.

Change History (4)

comment:1 Changed 3 years ago by dustymugs

This occurs with a geometry that is sufficiently smaller than the pixel

ST_Multi(ST_Buffer('SRID=910001;POINT(624772 1534404)', 10))

The following geometry works.

ST_Multi(ST_Buffer('SRID=910001;POINT(624772 1534404)', 85))
WITH foo AS (
	SELECT ST_Multi(ST_Buffer('SRID=910001;POINT(624772 1534404)', 80)) AS geom
	ST_DumpValues(ST_Clip(r.rast, foo.geom))
FROM test_raster r
JOIN foo
	ON ST_Intersects(r.rast, foo.geom)

The test raster was loaded with the following. The SRID is something user-specified for the projection of the raster.

raster2pgsql -s 910001 -t 1073x1 -R -C /tmp/ds.maxt.bin test_raster | psql

comment:2 Changed 3 years ago by robe

Milestone: PostGIS 2.1.2PostGIS 2.2.0

dustymugs -- push this back to 2.1.2 if you plan to get to it within next 2 weeks.

comment:3 Changed 23 months ago by dustymugs

Priority: mediumhigh

comment:4 Changed 18 months ago by robe

Milestone: PostGIS 2.2.0PostGIS 2.1.9

dutstymugs - push this back to 2.2.0 (or better yet do for 2.1.9 and 2.2.0) if you plan to have it in next couple of days.

Note: See TracTickets for help on using tickets.