[gdal-dev] NSIF with GDAL

Bar Ori Ori.Bar at elbitsystems.com
Mon Aug 31 03:51:17 PDT 2015


First, thank you for the information about the FWTool, I will try the gisinternals as suggested.

Second, Sorry, yes...
This huge document has table with the metadata needed.
For example (not in the document) , I want to add a field named "CNRTYCODE" with the value "US". How do I add it as part of my nsf file without any aux.xml file?
Is there any documentation how to work with the TRE?

-----Original Message-----
From: Even Rouault [mailto:even.rouault at spatialys.com] 
Sent: Monday, 31 August 2015 13:25
To: Bar Ori
Cc: gdal-dev at lists.osgeo.org; Ben Saraf Omer
Subject: Re: [gdal-dev] NSIF with GDAL

Le lundi 31 août 2015 12:17:17, Bar Ori a écrit :
> The metadata I am trying to add is according to " STANAG 4545 /AEDP-4 
> NATO Secondary Imagery Format (NSIF)"
> (http://www.nato.int/structur/ac/224/standard/4545/4545_documents/4545
> _ed1
> _amd1.pdf)

Pointing at a 160 page long document isn't really what I'm calling to be "specific" ;-) Which fields are you trying to write ?

> I read about the TRE at http://gdal.org/frmt_nitf_advanced.html
> but didn't understood exactly how to work with it in my code. But 
> again, will it be saved on the file itself or on external file? My 
> goal is to have all in one nsf file.

It will be written in the file. Composing TRE isn't admitedly obvious. It requires 

> 
> P.S. for viewing the metadata, I am using the FWTool, do you think 
> maybe there is the problem? Maybe this tool cannot read it from the 
> file even when exists?

Hum, FWTools is really deprecated and hasn't been updated in years, although I would think it should be able to read, at least the main metadata fields.

I'd recommend using up-to-date builds at http://gisinternals.com/ rather. 
Especially for the writing part, since some of the improvements in the NITF driver must be posterior to the latest FWTools version.

> 
> Thanks, Ori.
> 
> -----Original Message-----
> From: Even Rouault [mailto:even.rouault at spatialys.com]
> Sent: Monday, 31 August 2015 12:42
> To: Bar Ori
> Cc: gdal-dev at lists.osgeo.org; Ben Saraf Omer
> Subject: Re: [gdal-dev] NSIF with GDAL
> 
> Le lundi 31 août 2015 11:21:51, vous avez écrit :
> > Hi Even,
> > Thanks for your quick response.
> > I have already read and worked according to this document
> > (http://gdal.org/frmt_nitf.html) Still, after removing the aux.xml 
> > file, the data is gone with it.
> 
> That's a bit surprising. See:
> 
> $ gdal_translate -q byte.tif byte.ntf -of NITF -co FTITLE=foo -a_srs
> EPSG:32611 $ rm byte.ntf.aux.xml $ gdalinfo byte.ntf | grep FTITLE 
> NITF_FTITLE=foo
> 
> > Moreover, this document talks about specific info which is relevant 
> > to NITF header, but I have an additional information that is not 
> > part of NITF (my metadata is relevant to NSIF - STANAG 4545).
> 
> It is a bit difficult to comment as you're not very specific about 
> which exact info you're trying to write.
> 
> You've the possibility to write content of TREs (for most of them 
> you'll have to compose it manually) in file or image subheaders with 
> the TRE= and FILE_TRE= creation options.
> 
> Even
> 
> --
> Spatialys - Geospatial professional services http://www.spatialys.com
> 
> The information in this e-mail transmission contains proprietary and 
> business sensitive information.  Unauthorized interception of this 
> e-mail may constitute a violation of law. If you are not the intended 
> recipient, you are hereby notified that any review, dissemination, 
> distribution or duplication of this communication is strictly 
> prohibited. You are also asked to contact the sender by reply email 
> and immediately destroy all copies of the original message.

--
Spatialys - Geospatial professional services http://www.spatialys.com

The information in this e-mail transmission contains proprietary and business 
sensitive information.  Unauthorized interception of this e-mail may constitute 
a violation of law. If you are not the intended recipient, you are hereby 
notified that any review, dissemination, distribution or duplication of this 
communication is strictly prohibited. You are also asked to contact the sender 
by reply email and immediately destroy all copies of the original message.


More information about the gdal-dev mailing list