[gdal-dev] problem with gdal_translate jp2 file from the usgs (linux)

Hare, Trent thare at usgs.gov
Thu Apr 24 14:45:05 PDT 2014


Kasper,
  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:

> kdu_expand -i geo.jp2 -o geo.tif -num_threads 2
"    -- 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."

You can download Linux binaries from:
http://www.kakadusoftware.com/index.php?option=com_content&task=view&id=26&Itemid=22

good luck,
Trent



On Thu, Apr 24, 2014 at 2:29 PM, Kasper van Wijk
<k.vanwijk at auckland.ac.nz>wrote:

> 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?
>
> Thanks again,
> Kasper
>
>
> On 25 April 2014 09:25, Even Rouault <even.rouault at mines-paris.org> wrote:
>
>> Le jeudi 24 avril 2014 23:17:29, Kasper van Wijk a écrit :
>> > dear all,
>> >
>> > I am downloading jp2 data from the usgs national map. To plot this in
>> > cartopy, I need to transform to something else, such as geotiff.
>> However,
>> > using gdal_translate I get a warning copied below, and the output is a
>> > grainy bw version of the image. I have checked my results under linux
>> both
>> > fedora core 20 and ubuntu 12.04 versions with GDAL 1.7.3, released
>> > 2010/11/10
>> >
>> > gdal_translate m_3810623_ne_13_1_20110921_20111031.jp2 test.tiff -of
>> GTiff
>> >
>> > warning: not enough tile data (2 bytes)
>>
>> Apparently your GDAL build uses libjasper as the jpeg2000 library. Jasper
>> doesn't work very well unfortunately with some real world images.
>> You might want to compile GDAL against one of the other JPEG2000 libraries
>> that are supported : see http://gdal.org/formats_list.html
>>
>> --
>> Geospatial professional services
>> http://even.rouault.free.fr/services.html
>>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140424/747532a4/attachment-0001.html>


More information about the gdal-dev mailing list