<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>NITF CGM Parsing solution</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
<BR><FONT FACE="Times New Roman">I would like to share how I was able to use “Uniconvertor” library to parse NITF CGM data.</FONT>
</P>
<P><FONT FACE="Times New Roman">For those of you who worked with NITF images, you probably know NITF specification supports graphics with CGM. There are libraries out there that will read out CGM data (GDAL being one of them), but none of them translates raw CGM data into a useful form. And it has being very difficult to find any open source library that would actually parses CGM. </FONT></P>
<P><FONT FACE="Times New Roman">However, I have found the Uniconvertor, which is an open source universal vector graphics translator in Python. Since the program supports CGM, we were able to use Uniconvertor to parse CGM into the Uniconvertor format (they called it document). At that point you can read graphics data from the Uniconvertor “documents” and in each of the “document” you can retrieve information for individual geometry as well as properties. </FONT></P>
<P><FONT FACE="Times New Roman">I was able to successfully read and render NITF official sample image U_1092c.NTF, which contains around 100 different CGM shapes including lines, texts, rectangles, polygons, circles and ellipses.</FONT></P>
<P><FONT FACE="Times New Roman">Here are some of the Pros and Cons of Uniconvertor:</FONT>
<BR><FONT FACE="Times New Roman">Pros:</FONT>
<UL>
<OL TYPE=1>
<LI><FONT FACE="Times New Roman">It parse multiple vector formats: CDR, CDRX, CDT, CMX, AI, CGM, WMF, XFIG, SVG, SK, SK1, AFF,etc. You can use Uniconvertor to convert other vector data into GDAL/OGR formats.</FONT></LI>
<LI><FONT FACE="Times New Roman">It’s open source (LGPL)</FONT></LI>
<BR>
</OL></UL>
<P><FONT FACE="Times New Roman">Cons:</FONT>
<OL TYPE=1>
<LI><FONT FACE="Times New Roman">Written in Python. You cannot use this in another languages.</FONT></LI>
<LI><FONT FACE="Times New Roman">No interface documentation or tutorial.</FONT></LI>
<LI><FONT FACE="Times New Roman">In the CGM case, Uniconvertor did some coordinate transformation after it read in the data. I had to look through the source code and worked out the inverse transformation to get the original coordinate.</FONT></LI>
<BR>
</OL>
<P><FONT FACE="Times New Roman">Uniconvertor: </FONT><A HREF="http://sk1project.org/modules.php?name=Products&product=uniconvertor"><U><FONT COLOR="#0000FF" FACE="Times New Roman">http://sk1project.org/modules.php?name=Products&product=uniconvertor</FONT></U></A>
</P>
<P><FONT FACE="Times New Roman">In conclusion, it’s possible to use Uniconvertor to parse CGM data into a usable form. Moreover, since Uniconvertor supports multiple vector formats, you can use the approach I described to convert other vector graphics formats into an OGR dataset.</FONT></P>
<P><FONT FACE="Times New Roman">-Kevin</FONT>
</P>
</BODY>
</HTML>