[Gdal-dev] Attaching Text Files in NITF driver

Frank Warmerdam warmerdam at pobox.com
Fri Sep 5 13:23:51 EDT 2008


Radeus wrote:
> Frank,
> Other than implementing the SetMetadata() and SetMetadataItem() in the
> NITFDataset, what else should I look at changing. I know I should be writing
> this information from the GDALMultiDomainMetadata in the destructor (or at
> least that is what I think based on GTiff implementation) but I have not
> figured out how. Any advice would be greatly appreciated!

Radeus,

I believe you will need to establish the text segments at the point
the NITF file is created, as it is hard to restructure file size and
offsets after that.  So, the suggested approach would be to add logic
to handle the text segments in NITFCreate() in nitffile.c.

The text contents would presumably have to come from the passed in
options list.

The NITFCreateCopy() method in nitfdataset.cpp would then need to be
modified to pass the metadata from the source dataset into NITFCreate()
through the options list, somewhat similarly to how it handles the TRE
stuff now (search for "Copy TRE definitions as creation options").

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