[Gdal-dev] loading metadata into NITF from separate image format
Frank Warmerdam
warmerdam at pobox.com
Tue Sep 4 22:22:45 EDT 2007
Jared Rubin wrote:
> Sophia,
> I am have my own internal image format and would like to stuff metadata into
> a nitf file without relying upon the command line. So for example I want to
> place the ANGLE_TO_NORTH into the USE00A tag for NITF.
> I am inheriting from RawDataSet
>
> I see the that the nitf library uses
> GDALPamDataset->SetMetadata
> and
> GDALPamDataset->SetMetadataItem
>
> is this how the metadata gets passed between image formats?
Jared,
First, I don't believe the GDAL NITF writer supports producing USE00A
segments.
Most values that are readable as metadata by the NITF driver, such as
file header fields such as NITF_FTITLE can be passed to the NITF Create()
and CreateCopy() methods as creation options with the NITF_ prefix omitted.
So to set the FTITLE field in an NITF file you would pass the FTITLE
creation option in.
A few fields may also be copied from the metadata of the source file in
CreateCopy() (such as NITF_BLOCKA metadata and NITF_FHDR) but this is
a fairly recent thing. So setting metadata on your dataset will not
generally result in it being written into the NITF file even if you are
careful to pick the NITF style metadata names. This is an area where
driver behavior varies quite a bit.
I hope this helps a bit.
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