Version 5 (modified by warmerdam, 3 years ago)

add pointer to another useful patch for libecwj.

ECW

 http://www.gdal.org/frmt_ecw.html

Download ECW JPEG SDK

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 libecwj2-3.3-2006-09-06.zip.

The source code is equipped with configure and Makefile.in scripts. There is also an utility script called bootstrap that can be used to regenerate the configure and Makefile.in 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

TO BE DONE

Patches

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  http://trac.osgeo.org/mapserver/ticket/3245.

Open Tickets

#885
ECW output & -co "TARGET="
#1099
Please support --with-ecw-includes and --with-ecw-libs
#1232
make '-co worldfile=yes" available to all drivers
#1253
Make ECW search for its georegistration information from MapInfo TAB files
#1655
ECW support doesn't work on OSX
#2162
ecw_cs.dat file provenance cloudy
#2340
Problem with italian datum
#4103
ECW/JP2ECW Create methods have issues
#4127
Additional CRS definitions for ECW file ecw_cs.wkt
#5050
When "gdal_ECW_JP2ECW" plugin is enabled exit code is always zero