ECW Format

Frank Warmerdam warmerdam at p...
Mon Apr 2 13:28:12 EDT 2001


Folks, 

I have made a prelinary attempt to add ECW support to GDAL with some success.
The implementation is in gdal/frmts/ecw, and to build it in you need to 
uncomment the ECW definitions, and correct the ECWDIR definition.

Of course, you also need to download and install the ECW SDK from Ermapper
(www.ermapper.com). 

Issues:
o The ECW SDK seems to have some sorts of threading issues. I am not to
Windows savvy, but I think I am currently building with default C libraries
on Windows, when I should be using multithreaded libraries. 

o It seems that exit() isn't working properly for applications using GDAL
if the ECW driver gets called. In particular exit() hangs on WinNT, and
you need to terminate the task with the Task Manager. I imagine this 
relates to the above multi-threading problems. 

o Overall performance is disappointing in OpenEV. I am not sure why, but
the "set view" call in the ECW SDK seems pretty expensive, and I am making
one for every tile request. 

o Performance is terribly bad for stuff like gdal_translate because a set
view is done for each scanline. I can, and will likely improve on this
in the future by keeping "view state" across multiple RasterIO calls. 

o On the up side, GDAL is taking advantage of the ECW SDK support for 
extracting overviews efficiently, and the GDAL ECW driver reports support
for "arbitrary overviews" to the application. A GDAL RasterIO method is
implemented for ECW allowing maximum efficiency extracting tiles and
different resolutions. Note, I believe this results in skipping the
GDAL tile cache entirely which may be good or bad depending on your 
view point, and circumstances. 

o The ECW file open function (NCScbmOpenFileView()) is crashing for me 
sometimes when called with non-ECW files. For the time being I only
try to open files if they have the ecw extention, meaning that support
for the ecw-over-the-net urls doesn't work now. This could be changed
in the future. 

If there is sufficient interest I could try and prepare a current OpenEV
build with ECW support, though I don't have the where-with-all to build 
the fancy installer, so it would just be a zip file of the install tree.

Best regards,

---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at p...
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list