[gdal-dev] CADRG subdataset access help

Christiaan Janssen cjanssen at iavo-rs.com
Fri Jul 25 16:02:55 EDT 2008


I'm working programmatically. I sort of understand the mechanism described in the suggested document but would greatly appreciate a short snippet to show how one goes about opening the subdataset. I'm guessing in the example described on the web page that to open the first dataset I would call GDALOpen as follows:

GDALOpen("NITF_IM:0:multi_1b.ntf", GDALAccess::GA_ReadOnly);

Christiaan

-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com] 
Sent: Friday, July 25, 2008 3:52 PM
To: Christiaan Janssen
Cc: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] CADRG subdataset access help

Christiaan Janssen wrote:
> How exactly does one go about accessing the raster data in an format 
> that contains subdatasets like CADRG? Any help would be greatly appreciated.
> 

Christiaan,

Are you working programmatically or as a user with end-user tools like gdalinfo and gdal_translate?

For an end user, one would normally run gdalinfo against the file/dataset and see the reported subdataset names.  Then run gdalinfo or gdal_translate against the desired subdataset name.

Scripts/applications operate similarly, fetching the subdataset names from metadata.

You may find it helpful to read the section titled "SUBDATASETS Domain" in this doc:

   http://www.gdal.org/gdal_datamodel.html

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