On Thu, Jul 30, 2015 at 5:03 AM, user gdal userofg...@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
GDALGetGeoTransform(GDALDatasetH, double*);
See the api tutorial for more information:
http://gdal.org/gdal_tutorial.html
Any help, please!
With thanks,
Yours sincerely,
B. Ramesh
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
--
Kyle
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev