[Gdal-dev] How to get NITF image resolution

Frank Warmerdam warmerdam at pobox.com
Tue Jun 12 22:44:55 EDT 2007


Alison Luo wrote:
> I need to get the resolution of NITF images. I read
> through all the nitf-related code in GDAL source code,
> but I do not seem to be able to find the code to get
> NITF image resolution.

Alison,

The GDALGetGeoTransform() function or GetGeoTransform() method on
the GDALDataset will return an affine transformation mapping pixel/line
coordinates to georeferenced coordinates.  For unrotated (north up)
images the pixel width will be the second entry in this array, and
the pixel height will be the negative of the sixth element of this
array.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list