Does gdal_translate actually write values specified via -mo into the
output NITF files?  It seems that metadata fields specified with
-mo get put into the .aux.xml file, but not into the actual output NITF
file.  For example:

gdal_translate -of NITF -mo "NITF_FTITLE="myspecialvalue" infile.ntf

That seems to run, so I do gdalinfo on outfile.ntf.  Great, I get:

But - when I take my NITF into software able to show headers (say, Erdas
Imagine), the FTITLE header appears to be blank. On investigation, it
appears that the run of gdalinfo outfile.ntf is actually just reporting
the contents of outfile.ntf.aux.xml.  If I remove that file, and run
gdalinfo outfile.ntf, I get a blank NITF_FTITLE!

A few headers are getting written into the output NITF file, such as
OSTAID, but even these appear to have hardcoded values, except for
as put in the .aux.xml file. In the case of OSTAID my custom value
gets put into outfile.ntf.aux.xml, and reported by gdalinfo. If
I delete outfile.ntf.aux.xml, and rerun gdalinfo outfile.ntf, the
value GDAL is reported.

Any ideas or info?


gdal-dev mailing list

Reply via email to