[R-sig-Geo] get raster pixel x,y points from lat/lon?

David Mireles dmireles at gmail.com
Wed Sep 9 19:19:54 CEST 2009


I'm new to rgdal and gdal--  I have a very large nitf image (too big
to fit in memory) that I would like to extract subset areas of
interest based on a center lat/long coordinate (and possibly an
elevation). I would like to use the getRasterData function extract the
AOI (which requires pixel x,y offsets). How can I get the row/column
(x,y) for a specific lat/long coordinate in an spatial (latlon) image?
 I believe in gdal there is a gdaltransform tool where you supply the
image, specify -i (inverse) and -rpc and it will return the x,y point.
Anyone know how I can do this in rgdal? (Will spTransform do this? Do
I need make a .Call to some GDAL function?)
Thanks in advance,
dm



More information about the R-sig-Geo mailing list