[Gdal-dev] loading metadata into NITF from separate image format

Jared Rubin JARED.RUBIN at saic.com
Wed Sep 5 00:28:37 EDT 2007


Frank,
  So as long I pass all the name/value pairs from my own image library format 
that I writing as a plugin to gdal to SetMetadata and SetMetadataItem, then 
the nitf library should write them out during the conversion? As long as I 
set them appropriately in SetMetadataItem.
  In addition  if did want to pass additional name/value pairs that would be 
used for the RPC00A or USE00A tags, then I could set them and then extend the 
nitf library to write out the USE00A and RPC00A tags. Looking at the nitf 
driver, it doesn't support writing USE00A and RPC00A tags. It does read them 
though.
Thanks
JAred
On Tuesday 04 September 2007 19:22, Frank Warmerdam wrote:
> 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,



More information about the Gdal-dev mailing list