Version 7 (modified by Even Rouault, 12 years ago) ( diff )




In order to use ECW format with GDAL, you need to download Image Compression SDK from ER Mapper website. The SDK is available to download for logged in users on the website, so first you will need to register.

Building libecwj library on Unix

In order to use GDAL with ECW support under Linux, Solaris or Mac OS systems, you will need to build the libecwj library on your own, so it's required to download Image Compression SDK Source Code but not the binary distribution which is dedicated for Windows family systems. Current version is ECW SDK 3.3 and the source code package is named

The source code is equipped with configure and scripts. There is also an utility script called bootstrap that can be used to regenerate the configure and files, if you have installed required tools: autoconf, automake, m4, libtool.

In the former case, the procedure is simple:

$ cd /path/to/libecwj2-3.3
$ ./configure
$ make
# make install

where the last step should be run as superuser.

By default, the libecwj is installed using installation prefix pointing to /usr/local. You can change this location with --prefix option of configure script. Run ./configure --help for more details.

Mac OS X notes

There are a few problems possible with libecwj2-3.3 on Mac OS X. For more details, refer to Ticket #2032 - Building with ECW support on Mac OS X

Building GDAL with ECW support on Unix

Assuming you've installed libecwj library under default location, procedure of adding ECW support to GDAL is simple and you only need to provide GDAL configure with path to the ECW SDK installation prefix:

$ cd /path/to/gdal
$ ./configure --with-ecw=/usr/local
$ make
# make install

After these steps, you should be able to see the ECW in the list of formats supported by your GDAL installation:

$ gdalinfo --formats|grep ECW
  ECW (rw): ERMapper Compressed Wavelets
  JP2ECW (rw+): ERMapper JPEG2000

Building GDAL with ECW support on Windows



Building libecwj2-3.3 from source using recent compilers may require some improvements that can be found in the ticket #3162 - Fixes and patches for libecwj2.

A problem with opening and closing many ECW files consuming large amounts of memory with libecwj2-3.3 may be resolved using the libecwj patch in

A patch to avoid overflow in Linux implementation of NCSPhysicalMemorySize() in libecwj2-3.3 is available in the ticket #3366. This work around big memory usage for computers with RAM > 2 GB.

A patch to fix crash when creating 16 bit JP2 (that occurs on 64bit platforms) is available in ticket #2593.

Open Tickets

No results

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.