[gdal-dev] ECW support on Fedora Linux - error

Jean-Claude Repetto jrepetto at free.fr
Fri Jul 27 09:54:05 PDT 2012


On 27/07/2012 16:33, jkadlec wrote:
> Hi, I have a problem making GDAL work with ECW files on Fedora Linux 17.
> Here are the steps I did following the instructions on:
> http://trac.osgeo.org/gdal/wiki/ECW
> 1. I downloaded, installed and compiled libecwj 3.3 library
> 2. I downloaded the source of gdal 1.9.1
> 3. I ran ./configure --with-ecw, make and make install
> 4. gdalinfo --formats now includes ECW
> 5. However, I have a problem opening any ECW file with GDAL. For example, I
> downloaded the sample ECW files from 
> http://www.terracolor.net/sample_imagery.htmlhttp://
> http://www.terracolor.net/sample_imagery.html . One of the files is called
> Terracolor_SanFrancisco_US_15m.ecw
> When I run gdalinfo Terracolor_SanFrancisco_US_15m.ecw I get a weird error:
> 
> terminate called after throwing an instance of 'std::length_error' what():
> basic_string::_S_create Aborted (core dumped)
> 
> Other file types such as tiff or asc open with GDAL correctly.
> Was anybody able to get GDAL running with ECW support on Linux?
> Should I try to use the KAKADU library with GDAL instead of libecwj?
> 
> Any suggestions are welcome.
> 

Hi,

I have tested the file "Terracolor_SanFrancisco_US_15m.ecw" on Gentoo
Linux 64 bits, with GDAL 1.9.1, and libecwj2-3.3.
No problem :

$ gdalinfo Terracolor_SanFrancisco_US_15m.ecw
Driver: ECW/ERDAS Compressed Wavelets (SDK 3.x)
Files: Terracolor_SanFrancisco_US_15m.ecw
       Terracolor_SanFrancisco_US_15m.eww
Size is 7204, 7204
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        TOWGS84[0,0,0,0,0,0,0],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9108"]],
    AXIS["Lat",NORTH],
    AXIS["Long",EAST],
    AUTHORITY["EPSG","4326"]]
Origin = (-122.809804036593036,38.285436652047451)
Pixel Size = (0.000138800000000,-0.000138800000000)
Corner Coordinates:
Upper Left  (-122.8098040,  38.2854367) (122d48'35.29"W, 38d17' 7.57"N)
Lower Left  (-122.8098040,  37.2855215) (122d48'35.29"W, 37d17' 7.88"N)
Upper Right (-121.8098888,  38.2854367) (121d48'35.60"W, 38d17' 7.57"N)
Lower Right (-121.8098888,  37.2855215) (121d48'35.60"W, 37d17' 7.88"N)
Center      (-122.3098464,  37.7854791) (122d18'35.45"W, 37d47' 7.72"N)
Band 1 Block=7204x1 Type=Byte, ColorInterp=Red
  Overviews: 3602x3602, 1801x1801, 900x900, 450x450, 225x225
Band 2 Block=7204x1 Type=Byte, ColorInterp=Green
  Overviews: 3602x3602, 1801x1801, 900x900, 450x450, 225x225
Band 3 Block=7204x1 Type=Byte, ColorInterp=Blue
  Overviews: 3602x3602, 1801x1801, 900x900, 450x450, 225x225


I was also able to display the image in QGIS 1.8.0,

HTH !
Jean-Claude


More information about the gdal-dev mailing list