Opened 14 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 pracine, 14 years ago

Cc: robe added

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?

comment:2 by pracine, 14 years ago

There will be a st_value(rast raster, band integer, pt geometry) as well…

comment:3 by robe, 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.

comment:4 by pracine, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in r5661

Note: See TracTickets for help on using tickets.