[gdal-dev] query raster values by xy-location
jgomezdans at gmail.com
Fri Sep 26 09:26:49 EDT 2008
2008/9/26 <Andruit at gmx.de>
> I have an ESRI ascii raster and would like to get the raster values at
> defined x y locations.
> At the moment I am capable to load the Raster Dataset and can perform
> several operations like querying the Min/Max values, the origin, the
> pixelsize and so on....
> But is there a function to get the cell value of a raster at a certain
> location (x y)????
You can work out the row and column of your pixel from your (x,y) location
using the raster's geotransform. You can then read in the value of that
Hope that helps,
Centre for Terrestrial Carbon Dynamics
Department of Geography, University College London
Gower Street, London WC1E 6BT, UK
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev