[Gdal-dev] NITF image metadata domain field in GDAL - SUBDATASETS

Frank Warmerdam warmerdam at pobox.com
Fri Jun 8 11:11:14 EDT 2007


Alison Luo wrote:
> Hi Frank,
> 
> Thank you for the comment. Indeed I discovered that in
> a normal one-image NITF file there will be no
> subdatasets. In that case, how do I acquire the image
> data?
> 
> In the addition, it seems the image data is compressed
> either as jpeg or jp2k in NITF. How do I pull out the
> compress image data using GDAL? 

Alison,

If you GDALOpen() an NITF file, the return GDALDataset is
implicitly for the first image in the NITF file.  So just
use normal mechanism (GetRasterBand(1)->RasterIO(), etc) to
access the image data.

JPEG and JPEG2000 decompression should be handled automatically
by GDAL if you are using an appropriately configured and reasonably
recent build of GDAL (ie. 1.4.0 or newer and with the Kakadu or ECW
SDK built in for jpeg2000 support).

You can refer to the GDAL API tutorial for additional details on
general image access.

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