[gdal-dev] NSIF with GDAL

Bar Ori Ori.Bar at elbitsystems.com
Mon Aug 31 02:21:51 PDT 2015


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.
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).

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

Le lundi 31 août 2015 10:34:25, Bar Ori a écrit :
> Hello,
> I have a purpose to create a file in format of NSIF.
> As far as understood, I need to use the NITF driver and set the 
> metadata which is relevant to NSIF. I tried to work with GDAL to make 
> it, but noticed that the metadata is saved on a "aux.xml" file. When I 
> remove this file or when set the GDAL_PAM_ENABLED as NO, so I lose all 
> metadata I set (return to default or deleted). My goal is to create 
> one file (.nsf) containing all the relevant metadata. My question is 
> whether it is possible to create one file as I want. In case that yes, how to do it?
> 
> P.S. I am using GDAL in C#

Ori,

Quoting http://gdal.org/frmt_nitf.html:
"""
 Creation Options:

    * Most file header, imagery header metadata and security fields can be set with appropriate creation options (although they are reported as metadata item, but must not be set as metadata). For instance setting "FTITLE=Image of abandoned missle silo south west of Karsk" in the creation option list would result in setting of the FTITLE field in the NITF file header. Use the official field names from the NITF specification document; do not put the "NITF_" prefix that is reported when asking the metadata list.
"""

The full list of creation options is given by:
gdalinfo --format nitf

In C#, that would be something like

string[] options = new string [] {"FTITLE=mytitle"};

Dataset out_ds = drv.CreateCopy("out.ntf", src_ds, 0, options, null, null); or Dataset out_ds = drv.Create("out.ntf", width, height, bands,
                                             DataType.GDT_Byte, options);

Even

> 
> Hope for a for a quick response.
> Thanks,
> 
> 
> Ori Bar | Software Developer
> 
> T +972-9-8898900 | M +972-504-734296
> 
> @ Ori.Bar at Elbitsystems.com<mailto:Ori.Bar at Elbitsystems.com>
> 
> 
> [Description: Description: Logo]
> 
> 
> 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