[gdal-dev] Getting CGM from NITF file

Frank Warmerdam warmerdam at pobox.com
Wed Apr 9 22:04:13 EDT 2008


Visser, John B. wrote:
> I apologize if there's an online resource that already answers my
> question.
> 
> I have a NITF file with several annotations saved into it.  I've
> discovered how to get at them by accessing the "CGM" metadata, but
> things don't look quite right.  What are all the escaped zeroes in
> there?  Is there some way to convert them back to their native byte
> representation or access them directly that way?

JV,

The raw data is escaped using CPLEscapeString(), and can be converted
back to the original form using CPLUnescapeString().

   http://www.gdal.org/cpl__string_8h.html#74938e1e92b5847af925600af609f8d3

Also page up to CPLEscapeString() for additional details.

I doubt the escape/unescape functions are exposed through swig, but they
are readily available in c/c++.

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    | President OSGeo, http://osgeo.org



More information about the gdal-dev mailing list