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

2014-04-24 Thread Even Rouault
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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

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

2014-04-24 Thread Kasper van Wijk
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.roua...@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

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

2014-04-24 Thread Even Rouault
Le jeudi 24 avril 2014 23:29:03, Kasper van Wijk a écrit :
 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?

You will find various resources at http://trac.osgeo.org/gdal/wiki/BuildHints

Most interesting links for your use case :
* http://trac.osgeo.org/gdal/wiki/DownloadSource
* http://trac.osgeo.org/gdal/wiki/BuildingOnUnix
* http://trac.osgeo.org/gdal/wiki/ECW : if you want to compile against ECW SDK
* http://gdal.org/frmt_jp2openjpeg.html : if you want to compile against 
OpenJPEG v2

 
 Thanks again,
 Kasper
 
 On 25 April 2014 09:25, Even Rouault even.roua...@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

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

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

2014-04-24 Thread Hare, Trent
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_contenttask=viewid=26Itemid=22

good luck,
Trent



On Thu, Apr 24, 2014 at 2:29 PM, Kasper van Wijk
k.vanw...@auckland.ac.nzwrote:

 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.roua...@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@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/gdal-dev

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

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

2014-04-24 Thread Eli Adam
Kasper,

On Thu, Apr 24, 2014 at 2:32 PM, Even Rouault
even.roua...@mines-paris.org wrote:
 Le jeudi 24 avril 2014 23:29:03, Kasper van Wijk a écrit :
 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?

Compiling is a great option and might be the best.  You might also
want to check which drivers are in Ubuntu GIS and Enterprise Linux GIS
which might be easier than compiling.  They are often more recent and
with more features than the standard repos.

https://wiki.ubuntu.com/UbuntuGIS
http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS

Best regards, Eli


 You will find various resources at http://trac.osgeo.org/gdal/wiki/BuildHints

 Most interesting links for your use case :
 * http://trac.osgeo.org/gdal/wiki/DownloadSource
 * http://trac.osgeo.org/gdal/wiki/BuildingOnUnix
 * http://trac.osgeo.org/gdal/wiki/ECW : if you want to compile against ECW SDK
 * http://gdal.org/frmt_jp2openjpeg.html : if you want to compile against
 OpenJPEG v2


 Thanks again,
 Kasper

 On 25 April 2014 09:25, Even Rouault even.roua...@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

 --
 Geospatial professional services
 http://even.rouault.free.fr/services.html
 ___
 gdal-dev mailing list
 gdal-dev@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/gdal-dev
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


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

2014-04-24 Thread Kasper van Wijk
Eli: thanks for the new repo. This got me from gdal 1.7.3 to 1.9.1, but
still the same warning/output

Trent: I downloaded the linux binaries and followed the instructions in the
README (about PATHS), but:
kasper@PALette:~/Downloads$ kdu_expand -i
m_3810623_ne_13_1_20110921_20111031.jp2 -o geo.tif -num_threads 2
bash: /home/kasper/kakadu/bin/kdu_expand: cannot execute binary file

Even: I managed to install the http://gdal.org/frmt_jp2openjpeg.html, and
downloaded and install gdal1.10 against the openjpeg libs, but

kasper@PALette:~/Downloads/gdal-1.10.1$ !gdal
gdal_translate
ERROR 1: gdal_translate was compiled against GDAL 1.10 but current library
version is 1.9

How/where do I get the 1.10 libs? Or should I install GDAL1.09 to match?

Cheers,
kasper



On 25 April 2014 09:43, Eli Adam ea...@co.lincoln.or.us wrote:

 Kasper,

 On Thu, Apr 24, 2014 at 2:32 PM, Even Rouault
 even.roua...@mines-paris.org wrote:
  Le jeudi 24 avril 2014 23:29:03, Kasper van Wijk a écrit :
  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?

 Compiling is a great option and might be the best.  You might also
 want to check which drivers are in Ubuntu GIS and Enterprise Linux GIS
 which might be easier than compiling.  They are often more recent and
 with more features than the standard repos.

 https://wiki.ubuntu.com/UbuntuGIS
 http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS

 Best regards, Eli

 
  You will find various resources at
 http://trac.osgeo.org/gdal/wiki/BuildHints
 
  Most interesting links for your use case :
  * http://trac.osgeo.org/gdal/wiki/DownloadSource
  * http://trac.osgeo.org/gdal/wiki/BuildingOnUnix
  * http://trac.osgeo.org/gdal/wiki/ECW : if you want to compile against
 ECW SDK
  * http://gdal.org/frmt_jp2openjpeg.html : if you want to compile against
  OpenJPEG v2
 
 
  Thanks again,
  Kasper
 
  On 25 April 2014 09:25, Even Rouault even.roua...@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
 
  --
  Geospatial professional services
  http://even.rouault.free.fr/services.html
  ___
  gdal-dev mailing list
  gdal-dev@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/gdal-dev

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

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

2014-04-24 Thread Simon Shak
Personally I recommend either the erdas ecwj2k or mrsid driver for uses jp2
files.
On Apr 24, 2014 7:25 PM, Kasper van Wijk k.vanw...@auckland.ac.nz wrote:

 Eli: thanks for the new repo. This got me from gdal 1.7.3 to 1.9.1, but
 still the same warning/output

 Trent: I downloaded the linux binaries and followed the instructions in
 the README (about PATHS), but:
 kasper@PALette:~/Downloads$ kdu_expand -i
 m_3810623_ne_13_1_20110921_20111031.jp2 -o geo.tif -num_threads 2
 bash: /home/kasper/kakadu/bin/kdu_expand: cannot execute binary file

 Even: I managed to install the http://gdal.org/frmt_jp2openjpeg.html, and
 downloaded and install gdal1.10 against the openjpeg libs, but

 kasper@PALette:~/Downloads/gdal-1.10.1$ !gdal
 gdal_translate
 ERROR 1: gdal_translate was compiled against GDAL 1.10 but current library
 version is 1.9

 How/where do I get the 1.10 libs? Or should I install GDAL1.09 to match?

 Cheers,
 kasper



 On 25 April 2014 09:43, Eli Adam ea...@co.lincoln.or.us wrote:

 Kasper,

 On Thu, Apr 24, 2014 at 2:32 PM, Even Rouault
 even.roua...@mines-paris.org wrote:
  Le jeudi 24 avril 2014 23:29:03, Kasper van Wijk a écrit :
  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?

 Compiling is a great option and might be the best.  You might also
 want to check which drivers are in Ubuntu GIS and Enterprise Linux GIS
 which might be easier than compiling.  They are often more recent and
 with more features than the standard repos.

 https://wiki.ubuntu.com/UbuntuGIS
 http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS

 Best regards, Eli

 
  You will find various resources at
 http://trac.osgeo.org/gdal/wiki/BuildHints
 
  Most interesting links for your use case :
  * http://trac.osgeo.org/gdal/wiki/DownloadSource
  * http://trac.osgeo.org/gdal/wiki/BuildingOnUnix
  * http://trac.osgeo.org/gdal/wiki/ECW : if you want to compile against
 ECW SDK
  * http://gdal.org/frmt_jp2openjpeg.html : if you want to compile
 against
  OpenJPEG v2
 
 
  Thanks again,
  Kasper
 
  On 25 April 2014 09:25, Even Rouault even.roua...@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
 
  --
  Geospatial professional services
  http://even.rouault.free.fr/services.html
  ___
  gdal-dev mailing list
  gdal-dev@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/gdal-dev



 ___
 gdal-dev mailing list
 gdal-dev@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/gdal-dev

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

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

2014-04-24 Thread Etienne Tourigny
On Thu, Apr 24, 2014 at 6:43 PM, Eli Adam ea...@co.lincoln.or.us wrote:

 Kasper,

 On Thu, Apr 24, 2014 at 2:32 PM, Even Rouault
 even.roua...@mines-paris.org wrote:
  Le jeudi 24 avril 2014 23:29:03, Kasper van Wijk a écrit :
  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?

 Compiling is a great option and might be the best.  You might also
 want to check which drivers are in Ubuntu GIS and Enterprise Linux GIS
 which might be easier than compiling.  They are often more recent and
 with more features than the standard repos.

 https://wiki.ubuntu.com/UbuntuGIS
 http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS


Looks like it hasn't been updated in quite a while (a full year actually),
it's using gdal 1.9.2 and qgis 1.8

From their page:

The goal of the Enterprise Linux GIS (ELGIS) effort is to ensure that the
latest stable versions of the main free GIS software run on the Enterprise
Linux platform.

cheers,
Etienne



 Best regards, Eli

 
  You will find various resources at
 http://trac.osgeo.org/gdal/wiki/BuildHints
 
  Most interesting links for your use case :
  * http://trac.osgeo.org/gdal/wiki/DownloadSource
  * http://trac.osgeo.org/gdal/wiki/BuildingOnUnix
  * http://trac.osgeo.org/gdal/wiki/ECW : if you want to compile against
 ECW SDK
  * http://gdal.org/frmt_jp2openjpeg.html : if you want to compile against
  OpenJPEG v2
 
 
  Thanks again,
  Kasper
 
  On 25 April 2014 09:25, Even Rouault even.roua...@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
 
  --
  Geospatial professional services
  http://even.rouault.free.fr/services.html
  ___
  gdal-dev mailing list
  gdal-dev@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/gdal-dev
 ___
 gdal-dev mailing list
 gdal-dev@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/gdal-dev

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev