[Gdal-dev] GDAL 1.19 with ECW problems

Frank Warmerdam warmerdam at pobox.com
Thu Feb 5 15:18:56 EST 2004


Mark Cave-Ayland wrote:
> Hi everyone,
> 
> I've just downloaded the latest release of OpenEV from Sourceforge with
> a view to seeing how well it can cope with ECW files. Unfortunately I
> discovered that with the default Windows installation, no ECW support is
> included, so I downloaded the ECW SDK along with GDAL 1.19 from
> remotesensing.org and recompiled with ECW support under VS6 using the
> instructions on www.remotesensing.org.
> 
> The installation process went something like this:
> 
> 1) Point ECWDIR to C:\Program Files\Earth Resource Mapping\Image Web
> Server\Client
> 2) Copy NCSECWc.dll from C:\Program Files\Earth Resource Mapping\ECW SDK
> to the above directory (it appears to be a very old version but I don't
> want to compress files yet anyway so this shouldn't matter).
> 3) Add the following lines near the top of ecwdataset.cpp:
> 
> CPL_C_START
> void GDALRegister_ECW();
> CPL_C_END
> 
> 4) Compile GDAL installing into C:\gdalinst
> 5) Check gdalinfo --formats to make sure ECW is listed.
> 6) Make a copy of gdal11.dll as gdal119.dll
> 7) Add the following to INCLUDE_DIRS in setup.py - "C:\gdalinst\install"
> 8) From the OpenEV installation of Python launch the following:
> 	python setup.py install
> 8) Copy gdal11.dll to OpenEV\bin
> 9) Copy _gdal.pyd as _gdal.dll into OpenEV\pymod
> 
> After this fiddling (I've only ever used Python once before!) I managed
> to install my new copy of GDAL in the OpenEV directory and I can now
> load an ECW into OpenEV using File->Import and I've managed to export an
> ECW as a JPEG. So far so good.
> 
> The part I'm now struggling with is trying to create a 3D view using two
> ECW rasters - a standard and a DEM. Unfortunately the problem I'm
> finding is that if I go to File->Open or File->Open 3D to load in the
> ECW file then Python generates an exception and crashes :(. So I guess
> what I'm looking for is: i) does this installation sound about right or
> have I really messed up my OpenEV installation, ii) why is File->Open
> different from File->Import and iii) how can a Python newbie go about
> debugging a GDAL/Python application under Win32 to find out exactly what
> the problem is?

Mark,

Wow, good effort!  Ideally it should be suffient to build gdal11.dll
seperately and then copy it over the existing gdal11.dll in the OpenEV
distribution.  Of course, any other newly required include files would
also have to be dumped there.  I'm not sure that even theupdated _gdal.pyd
should be needed as I think it is a thin wrapper over gdal11.dll that
wouldn't change just due to gdal build configurations.


I have no idea why ECW works for open, but not open 3d.  Can you run OpenEV
from a dos window so as to be able to capture the python exception trace
back?  That might be helpful.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
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