<div dir="ltr">Kasper,<div>  When I have trouble with the various Jp2 implementations, I seem to always lean on the Kakadu JP2 library. When GDAL is not available with Kakadu built-in (due to licensing), you can convert from Geojpeg2000 to geoTiff using the free Kakadu binaries. Example conversion:</div>


<div><br></div><div>> kdu_expand -i geo.jp2 -o geo.tif -num_threads 2<br></div><div><div>"    -- Decompresses a JP2 file, writing the result in the TIFF format, while attempting to record useful JP2 boxes in TIFF tags.  This is only a demonstration, rather than a comprehensive attempt to convert all possible boxes to tags.  However, one useful box which is converted (if present) is the GeoJP2 box, which may be used to store geographical information."<br>


</div></div><div><br></div><div>You can download Linux binaries from:</div><div><a href="http://www.kakadusoftware.com/index.php?option=com_content&task=view&id=26&Itemid=22" target="_blank">http://www.kakadusoftware.com/index.php?option=com_content&task=view&id=26&Itemid=22</a><br>


</div><div><br></div><div>good luck,</div><div>Trent</div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 24, 2014 at 2:29 PM, Kasper van Wijk <span dir="ltr"><<a href="mailto:k.vanwijk@auckland.ac.nz" target="_blank">k.vanwijk@auckland.ac.nz</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">thank you, Even, for the fast reply. I am a beginner at GDAL and installed the gdal suite with "standard" apt-get and yum, respectively. Can you point me to a place where I can read how to compile GDAL against one of the other JPEG2000 libraries, as you say?<div>



<br></div><div>Thanks again,</div><div>Kasper</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div>On 25 April 2014 09:25, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org" target="_blank">even.rouault@mines-paris.org</a>></span> wrote:<br>



</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Le jeudi 24 avril 2014 23:17:29, Kasper van Wijk a écrit :<br>
</div><div><div>> dear all,<br>
><br>
> I am downloading jp2 data from the usgs national map. To plot this in<br>
> cartopy, I need to transform to something else, such as geotiff. However,<br>
> using gdal_translate I get a warning copied below, and the output is a<br>
> grainy bw version of the image. I have checked my results under linux both<br>
> fedora core 20 and ubuntu 12.04 versions with GDAL 1.7.3, released<br>
> 2010/11/10<br>
><br>
> gdal_translate m_3810623_ne_13_1_20110921_20111031.jp2 test.tiff -of GTiff<br>
><br>
> warning: not enough tile data (2 bytes)<br>
<br>
</div></div><div>Apparently your GDAL build uses libjasper as the jpeg2000 library. Jasper<br>
doesn't work very well unfortunately with some real world images.<br>
You might want to compile GDAL against one of the other JPEG2000 libraries<br>
that are supported : see <a href="http://gdal.org/formats_list.html" target="_blank">http://gdal.org/formats_list.html</a><br>
<span><font color="#888888"><br>
--<br>
Geospatial professional services<br>
<a href="http://even.rouault.free.fr/services.html" target="_blank">http://even.rouault.free.fr/services.html</a><br>
</font></span></div></blockquote></div><br></div>
<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br></div></div>