[Gdal-dev] question about API tutorial

Frank Warmerdam warmerdam at pobox.com
Mon Jun 16 09:40:19 EDT 2003


Tim Smith wrote:
> Hello,
> I have just begun working with GDAL, so this is
> probably a simple mistake on my part.
> I have compiled the c++ API tutorial, and run it
> against a NITF file.  I have two questions:
> 1.  The tutorial compile complains on this line:
>    printf( "Driver: %s/%s\n",
>             poDataset->GetDriver()->c(), 
>             poDataset->GetDriver()->GetMetadataItem(
> GDAL_DMD_LONGNAME ) );
> 
> It tells me that "GetDescription" and
> "GetMetadataItem" are not members of GDALDriver.

Tim,

What version of GDAL are you using?  The GDALDriver should
have a GetMetadataItem() method if you are using a recent
version (1.1.8 or later for instance).  Likewise for
GetDescription().  Could you quote exact build errors?  Can
you verify that the methods exist in gdal_priv.h?  Can you
verify there are not any old copies of gdal_priv.h on your
system that might be unexpectedly getting used?

> 2.  If I comment out the above problem, and run the
> program with a NITF file, GetGeoTransform return a
> CE_FAILURE.

GDAL is not able to work out coordinate geotransformation information
for some NITF files.  If you can provide a smallish sample directly to me
I could look into whether this is a bug, or the nature of the file.

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    | Geospatial Programmer for Rent





More information about the Gdal-dev mailing list