Opened 15 years ago
Closed 14 years ago
#501 closed defect (fixed)
[wktraster] Implement a ST_Value based on world coordinates instead of raster coordinates
Reported by: | pracine | Owned by: | pracine |
---|---|---|---|
Priority: | medium | Milestone: | WKTRaster 0.1.6 |
Component: | raster | Version: | master |
Keywords: | Cc: | robe |
Description
The existing ST_Value function accept x and y as the raster coordinate of the pixel. It would be usefull to be able to return the value of the pixel based on world coordintes expressed in the coordinate system of the raster.
Change History (4)
comment:1 by , 14 years ago
Cc: | added |
---|
comment:2 by , 14 years ago
There will be a st_value(rast raster, band integer, pt geometry) as well...
comment:3 by , 14 years ago
Pierre,
Not sure what you mean. st_value(rast raster, band integer, pt geometry)
would be the one I would use for world coordinates. The other one is totally unnecessary.
The common use case is
SELECT r.value,st_value(r.rasst, 1, ptgeom) as val FROM rastetable INNER JOIN geomtable ON ST_Intersects(rastertable.rast,1, geomtable.ptgeom);
Can't really think why one would ever want a
st_value(rast raster, band integer, x float, y float)
It would just add unnecessary confusion and function bloat to me.
Any good name for this new function?
Should it be just an overload of ST_Value with float parameters:
st_value(rast raster, band integer, x float, y float)
and we understand that these params are world coordinate, not raster coordinates?