[gdal-dev] Spatial Resolution from img file
kyle at pobox.com
Thu Jul 30 07:55:21 PDT 2015
On Thu, Jul 30, 2015 at 5:03 AM, user gdal <userofgdal at gmail.com> wrote:
> Dear friends,
> I have a geo ref. ERDAS img file. How to obtain its spatial resolution
> programmatically (C++)?
> One suggestion I received was to refer to gdalinfo.c However I couldn't get
> the required information in gdalinfo.c. I also felt it to be unclear. What I
> have seen in gdalinfo is how to get columns, rows etc. (for which we needn't
> visit the gdalinfo program).
It's in there, the program prints out:
Pixel Sizes = (dx,-dy)
So it has to have the code.
> I expected something like GetXResolution(..) and GetYResolution(...) kind of
> situation. But...
The information you are looking for is contained in the geotranform
matrix available through
See the api tutorial for more information:
> Any help, please!
> With thanks,
> Yours sincerely,
> B. Ramesh
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
More information about the gdal-dev