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

Kasper van Wijk k.vanwijk at auckland.ac.nz
Thu Apr 24 14:17:29 PDT 2014


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)

and this warning repeats many times. FWIW, using "convert" from imagemagick
gave me the same warning/output.

To test my gdal install, I downloaded a jp2 from
http://www.microimages.com/gallery/jp2/, CB_TM432.jp2, and all is fine:

[kasper at localhost Downloads]$ gdal_translate CB_TM432.jp2 test.tiff -of
GTiff
Input file size is 361, 488
0...10...20...30...40...50...60...70...80...90...100 - done.

and the map using the tiff looks great!

Is there something different about the USGS jp2 format than the ones from
say microimages?

I asked the USGS help team, but they have no problems in a  Windows
environment, and do not have linux.

Best,
kasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140425/4740cf5c/attachment-0001.html>


More information about the gdal-dev mailing list