<!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.7652.24">
<TITLE>Using GDAL to process embedded JPEG2000 images within a NITF file</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT FACE="Book Antiqua">Hello,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Book Antiqua">I recently downloaded the GDAL1.5 source code and built my own DLL (on the Windows platform), adding support for OGDI and MrSID by obtaining the necessary libraries and modifying the NMAKE.OPT file (uncommenting some lines) – I also converted the necessary projects over to Visual Studio 2005 (8.0). I was successful in this and got GDAL to process the files I needed. </FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Book Antiqua">Now for the problem I’m having. Using another dataset, I was trying to process embedded JPEG2000 images within a NITF file and received the following errors:</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT FACE="Book Antiqua">ERROR 4: 'J2K_SUBFILE:3884,542714864,D:\xxxxxx.NTF' does not exist in the file system,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Book Antiqua">and is not recognised as a supported dataset name.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Book Antiqua">ERROR 1: Unable to open JPEG2000 image within NITF file.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Book Antiqua">Is the JP2KAK driver available?</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Book Antiqua">So I tried to add support for embedded JPEG2000 images within a NITF file by following the same type of procedure. First I tried to build in support for JASPER, thinking that this would be the “free” way to get JPEG2000 support (JP2KAK costs too much). I was able to build this support in, but I still get the same error messages from GDAL as shown above. Then I tried building in support for ECW, thinking it could possibly be used to uncompress the JPEG2000. However, I can’t get the ECW component to build – mainly because of compatibility problems with its source code and the version of Visual Studio I’m using (8 vs. 7.1). My question is: if I can get libecwj2.lib to build (or ncsecw.dll, ncsutil.dll and ncsnet.dll), will this help solve my problem (of getting GDAL to convert the embedded JPEG2000 images within NITF)?</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Book Antiqua">Please let me know if this is the right path to go down and, if it is, can you provide any help in getting ECW to build in my environment?</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT FACE="Book Antiqua">In search of another solution, I tried the following… I used the FWTOOLS version of GDAL and was able to successfully process the embedded JPEG2000 images within NITF, although I ‘m not sure specifically which driver(s) it used to do the processing. As a possible solution to my problem, I wanted to know if I could use these DLLs and freely distribute them. If so, is there anything in addition to what’s in your LICENSE.TXT file that I would need to display to an end user?</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Book Antiqua">Thanks in advance for any help you can give,<BR>
Debbie</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B></B></SPAN><B><SPAN LANG="en-us"></SPAN></B><A NAME=""><B><SPAN LANG="en-us"><FONT COLOR="#000080" FACE="Bradley Hand ITC">Debbie Smulevitz</FONT></SPAN></B></A><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT COLOR="#000080" SIZE=2 FACE="Century Gothic">Terrago Technologies, Inc.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT COLOR="#000080" SIZE=1 FACE="Century Gothic">dsmulevitz@terragotech.com</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT COLOR="#000080" SIZE=2 FACE="Century Gothic">678-391-9611</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>
</BODY>
</HTML>