Opened 15 months ago
Closed 2 months ago
#5495 closed defect (fixed)
ST_Clip(raster, geom) Docs does not says how the pixels are selected
Reported by: | latot | Owned by: | robe |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.5.0 |
Component: | documentation | Version: | 3.4.x |
Keywords: | Cc: |
Description
Hi all, I was playing with ST_Clip, until I notice that not all the pixels was selected from a linestring.
After checking the docs: https://postgis.net/docs/en/RT_ST_Clip.html
I notice there is no place that explain what ST_Clip does with the vectors…. checking with robe with enough buffer works, maybe uses the Bresenham algorithm, or selects it if fully covers the pixel… or if it covers the centroid of the pixel…
I think would be great clarify this on the Docs what is the condition to select the pixels.
Thx!
Change History (2)
comment:1 by , 13 months ago
Milestone: | PostGIS 3.4.1 → PostGIS 3.5.0 |
---|
comment:2 by , 2 months ago
Component: | raster → documentation |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
The docs have been updated to reflect. It picks any where the center of the pixel covers the raster. I also added the touched flag, if you would prefer if pixel touches any part of the vector. The default behavior is touched=false to maintain backward compatibility.