<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>According to&nbsp;<font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;"><a href="http://www.gdal.org/formats_list.html">http://www.gdal.org/formats_list.html</a></span></font> , GDAL supports four flavors of JPEG2000, four different implementations of wavelet compression, based on JasPer, Kakadu, ECW, and MrSID.&nbsp;Two of these four are available to me</div><div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">gdal_translate | grep 2000</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp;JP2KAK: JPEG-2000 (based on Kakadu)</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp;JPEG2000: JPEG-2000 part 1 (ISO/IEC 15444-1)</span></font></div><div>Which of these four are available to you?</div></div><div><br></div><div>When creating and writing a JPEG2000 file, use -of to specify which of the available flavors you want GDAL to use.</div><div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">/usr/bin/time gdal_translate </span><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><b>-of JPEG2000</b></span></font><span class="Apple-style-span" style="font-size: 12px;"> 18stj940125.tif 18stj940125_gdalV162_of_JPEG200.jp2</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">Input file size is 5000, 5000</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">0...10...20...30...40...50...60...70...80...90...100 - done.</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp; &nbsp; 24.27 real &nbsp; &nbsp; &nbsp; &nbsp;20.91 user &nbsp; &nbsp; &nbsp; &nbsp; 2.47 sys</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">/usr/bin/time gdal_translate </span><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><b>-of JP2KAK</b></span></font><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; 18stj940125.tif 18stj940125_gdalV162_of_JP2KAK.jp2</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">Input file size is 5000, 5000</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">0...10...20...30...40...50...60...70...80...90...100 - done.</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp; &nbsp; 15.75 real &nbsp; &nbsp; &nbsp; &nbsp;15.06 user &nbsp; &nbsp; &nbsp; &nbsp; 0.30 sys</span></font></div></div><div>Greg</div><div><br></div><br><div><div>On Aug 18, 2009, at 11:14 AM, Smart, Gary wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-GB" link="blue" vlink="purple" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"><div class="Section1"><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: 'Courier New'; ">I have tried just about all the standard J2K extensions – none appear to work.<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: 'Courier New'; ">This is the output from...<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><b><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: 'Courier New'; font-weight: bold; ">gdal_translate -of JPEG2000 image.ntf image.jp2<o:p></o:p></span></font></b></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: 'Courier New'; ">Input file size is 4008, 2672<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: 'Courier New'; ">0...10...20...30...40...50...60...70...80...90...100 - done.<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: 'Courier New'; ">ERROR 4: `image.jp2' not recognised as a supported file format.<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: 'Courier New'; ">The 0..10... bit happens absurdly quickly (as if it does nothing useful)<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: 'Courier New'; ">The ERROR is (I think) perhaps generated by an automatic gdalinfo directly after the translate.<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: 'Courier New'; ">Certainly, a gdalinfo on the created file returns an almost identical error.<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: 'Courier New'; ">I can convert the ntf file into a geotiff OK.&nbsp; But then, if I try and convert the geotiff to jp2 – it fails – giving exactly the same symptoms.&nbsp; Is there some sort of JPEG2000 library I have to specifically load or something?<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p>&nbsp;</o:p></span></font></div><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; "><div><div class="MsoNormal" align="center" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; text-align: center; "><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size: 12pt; "><hr size="2" width="100%" align="center" tabindex="-1"></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><b><font size="2" face="Tahoma"><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma; font-weight: bold; ">From:</span></font></b><font size="2" face="Tahoma"><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma; "><span class="Apple-converted-space">&nbsp;</span><a href="mailto:gdal-dev-bounces@lists.osgeo.org">gdal-dev-bounces@lists.osgeo.org</a> [<a href="mailto:gdal-dev-bounces@lists.osgeo.org" style="color: blue; text-decoration: underline; ">mailto:gdal-dev-bounces@lists.osgeo.org</a>]<span class="Apple-converted-space">&nbsp;</span><b><span style="font-weight: bold; ">On Behalf Of<span class="Apple-converted-space">&nbsp;</span></span></b>Greg Coats<br><b><span style="font-weight: bold; ">Sent:</span></b><span class="Apple-converted-space">&nbsp;</span>18 August 2009 15:44<br><b><span style="font-weight: bold; ">To:</span></b><span class="Apple-converted-space">&nbsp;</span>Smart, Gary<br><b><span style="font-weight: bold; ">Cc:</span></b><span class="Apple-converted-space">&nbsp;</span><a href="mailto:gdal-dev@lists.osgeo.org" style="color: blue; text-decoration: underline; ">gdal-dev@lists.osgeo.org</a><br><b><span style="font-weight: bold; ">Subject:</span></b><span class="Apple-converted-space">&nbsp;</span>Re: [gdal-dev] Converting to J2K</span></font><span lang="EN-US"><o:p></o:p></span></div></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p>&nbsp;</o:p></span></font></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">$ gdal_translate --version<o:p></o:p></span></font></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">GDAL 1.6.2, released 2009/07/31<o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">$ gdal_translate -of JPEG2000 18stj940125.tif 18stj940125.jp2<o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">Input file size is 5000, 5000<o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">0...10...20...30...40...50...60...70...80...90...100 - done.<o:p></o:p></span></font></div></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p>&nbsp;</o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">FYI The convention for JPEG2000 image files is to use the extension .jp2.<o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">Greg<o:p></o:p></span></font></div></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p>&nbsp;</o:p></span></font></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">On Aug 18, 2009, at 4:13 AM, Smart,<span class="Apple-converted-space">&nbsp;</span><st1:city w:st="on"><st1:place w:st="on">Gary</st1:place></st1:city><span class="Apple-converted-space">&nbsp;</span>wrote:<o:p></o:p></span></font></div></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><br><br><o:p></o:p></span></font></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">I am trying<span class="apple-converted-space">&nbsp;</span><b><span style="font-weight: bold; ">‘gdal_translate &nbsp;–of JPEG2000 &nbsp;thingy.ntf &nbsp;thingy.j2k’<span class="apple-converted-space">&nbsp;</span></span></b>but GDAL complains that it doesn’t understand the format<span class="apple-converted-space">&nbsp;</span><i><span style="font-style: italic; ">thingy.j2k<u1:p></u1:p></span></i></span></font><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">I think its getting the arguments confused.&nbsp; What am I doing wrong?</span></font><o:p></o:p></div></div></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p>&nbsp;</o:p></span></font></div></div></div>_______________________________________________<br>gdal-dev mailing list<br><a href="mailto:gdal-dev@lists.osgeo.org" style="color: blue; text-decoration: underline; ">gdal-dev@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" style="color: blue; text-decoration: underline; ">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></o:smarttagtype></o:smarttagtype></div></blockquote></div><br></body></html>