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

Frank Warmerdam warmerdam at pobox.com
Fri Jun 8 00:20:04 EDT 2007


Alison Luo wrote:
> I need to extract image data from NITF format metadata
> field. I know there is a SUBDATASETS domain field for
> this purpose. I used libraries from 
> http://vterrain.org/Distrib/gdal.html .
> 
> But the SUBDATASETS domain is not recognized. Here's
> my code:
> 
> 	GDALAccess	access = GA_ReadOnly;
> 	GDALDataset*  imgDataset = NULL;
> 	const char* pszFilename =
> ASFileSysDisplayStringFromPath(inFileSys, inPath);
> 	imgDataset = (GDALDataset*)GDALOpen(pszFilename,
> access); 	
> 
> 	GDALDriver* gDriver = imgDataset->GetDriver();
> 	const char* str =
> gDriver->GetMetadataItem(SUBDATASETS);

Alison,

I'm not exactly clear on what you want to do.

NITF files that contain multiple images will provide
special dataset names to access the specific images via
the SUBDATASETS metadata domain.  But in a normal one-image
NITF file there will be no subdatasets.

What does gdalinfo report for your file?  You might want to try
with the FWTools binaries if the vterrain build does not include
utilities.

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