[Gdal-dev] NITF image metadata domain field in GDAL - SUBDATASETS
Alison Luo
alison_luo2001 at yahoo.com
Fri Jun 8 02:03:13 EDT 2007
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?
Thanks,
Alison
--- Frank Warmerdam <warmerdam at pobox.com> wrote:
> 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
>
>
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/
More information about the Gdal-dev
mailing list