How can I get the real coordinates (i.e. X and Y) of a given grid cell when I know its row and column position? Thanks Demetris
Tell me more
×
Geographic Information Systems Stack Exchange is a question and answer site for
cartographers, geographers and GIS professionals. It's 100% free, no registration required.
|
If you know row, column, cellsize and extent, X & Y can easily be calculated. Note this assumes a North up raster. If the raster is rotated you'll need to know the other two affine transformation coefficients (or geotransform in GDAL speak). Also note that the column/row coordinates in the below are from (0.0,0.0) at the upper left corner of the upper left pixel. To get the coordinates of the centre of the column/row location you need to add 0.5 to the column and row values.
See also the IRaster2.PixelToMap Method (9.3 reference and 10 reference) |
||||
