Hi, I would like to share how I was able to use "Uniconvertor" library to parse NITF CGM data.
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. 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. 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. Here are some of the Pros and Cons of Uniconvertor: Pros: 1) 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. 2) It's open source (LGPL) Cons: 1) Written in Python. You cannot use this in another languages. 2) No interface documentation or tutorial. 3) 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. Uniconvertor: http://sk1project.org/modules.php?name=Products&product=uniconvertor 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. -Kevin
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev