Opened 6 years ago

Closed 3 years ago

#34 closed enhancement (invalid)

Add support for ECW/JP2 v5.0 in gdal-ecw-build

Reported by: lpinner Owned by: ubuntu@…
Component: GDAL Severity: normal
Keywords: ECW JPEG2000 Cc:

Description

Intergraph have just released the ECW/JP2 SDK v5.0 (http://osgeo-org.1560.x6.nabble.com/gdal-dev-ECW-JPEG2000-SDK-v5-0-now-available-td5066344.html) which finally includes linux support. Could you please add support for building the gdal ECW JP2ECW plugin with gdal-ecw-build?

Attachments (1)

ecwjp2_sdk.txt (20.5 KB) - added by lpinner 6 years ago.
ecwjp2_sdk filelisting

Download all attachments as: .zip

Change History (21)

comment:1 Changed 6 years ago by aboudreault

Does gdal 1.10 support it?

comment:2 in reply to:  1 Changed 6 years ago by lpinner

Replying to aboudreault:

Does gdal 1.10 support it?

Yes. Builds successfully (gdal 1.10 and ecw/jp2 v5.0) on ubuntu 13.04:

cd gdal-1.10
./configure --with-ecw=/path_to_sdk_v5/ecwjp2_sdk
make

comment:3 Changed 6 years ago by lpinner

I meant gdal builds successfully, not the plugin.

~/gdal-1.10/apps$ ./gdalinfo --formats|grep -i ecw
  ECW (rw+): ERDAS Compressed Wavelets (SDK 5.0)
  JP2ECW (rw+v): ERDAS JPEG2000 (SDK 5.0)

comment:4 Changed 6 years ago by lpinner

Forgot to mention, sdk v5.0 support added to gdal 1.10+ in ticket 5029 (http://trac.osgeo.org/gdal/ticket/5029)

comment:5 Changed 6 years ago by jlarouche

Did you try the plugin with the new 5.0 SDK? When I updated the package I only tested with 3.3 and it was working. From the look of the configure switch your using it seems to be the same, so I suppose you could try to compile the new 5.0 SDK and try the gdal-ecw-build script using it.

comment:6 Changed 6 years ago by lpinner

Yes.

sudo gdal-ecw-build /usr/local/ecwjp2_sdk
grep: /usr/local/ecwjp2_sdk/include/ECW.h: No such file or directory
/usr/local/ecwjp2_sdk seems not containing an ECW SDK 3.3

comment:7 Changed 6 years ago by aboudreault

I think we could easily fix this in the gdal-build-ecw script. lpinner, can you attach the list of the files (.txt) that ECW SDK 5 contains?

comment:8 Changed 6 years ago by lpinner

File listing attached.

Changed 6 years ago by lpinner

Attachment: ecwjp2_sdk.txt added

ecwjp2_sdk filelisting

comment:9 Changed 6 years ago by lpinner

The new version (libgdal-ecw-src 1.10.0-1~raring4) builds with SDK v5.0. Thankyou!

comment:10 Changed 6 years ago by jlarouche

Resolution: fixed
Status: newclosed

Great, it should still work with 3.3 too.

comment:11 Changed 6 years ago by ctweedie

Great to see these changes guys. Please contact me if any problems are found

comment:12 Changed 6 years ago by lpinner

Resolution: fixed
Status: closedreopened

jlarouche, I just tried to build the plugin for SDK v.5 on Ubuntu 12.04 with the updated libgdal-ecw-src (1.10.0-1~precise3) and it failed.

sudo gdal-ecw-build /usr/local/ecwjp2_sdk
grep: /usr/local/ecwjp2_sdk/include/ECW.h: No such file or directory
/usr/local/ecwjp2_sdk seems not containing an ECW SDK 3.3

I downloaded the 13.04 libgdal-ecw-src (1.10.0-1~raring4) deb and manually installed that on 12.04 and the gdal-ecw-build script succeeded.

comment:13 Changed 6 years ago by jlarouche

Uploaded new versions that should fix it, if you could confirm.

comment:14 Changed 6 years ago by lpinner

Yes, that fixed gdal-ecw-build on 12.04.

However, I'm getting the following error message when import the gdal python bindings on 12.04 and 13.04:

from osgeo import gdal
ERROR 1: /usr/lib/gdalplugins/1.10/gdal_ECW_JP2ECW.so: undefined symbol: _ZTI14GDALPamDataset
ERROR 1: /usr/lib/gdalplugins/1.10/gdal_ECW_JP2ECW.so: undefined symbol: _ZTI14GDALPamDataset

comment:15 Changed 6 years ago by jlarouche

Hmm, I didn't try the python binding. I'll look into it. Are you using ECW SDK 5.0 or 3.3?

If you really need it and you're using 3.3, the old gdal-ecw package for 1.10 should still work with it and the python binding.

comment:16 Changed 6 years ago by lpinner

Using v5.0. The python bindings still work, python doesn't crash on importing gdal, and I can open ECW/JP2 datasets. I assume that the GDALPamDataset auxilary metadata (.aux.xml) functionality will be broken though (untested).

comment:17 in reply to:  16 Changed 6 years ago by lpinner

Actually, I can't open ECW/JP2s datasets with the python bindings using the ECW/JP2ECW drivers ('not recognised as a supported file format' error. I can open JP2s because the python bindings fall back to the OpenJPEG based driver.

The GDAL executables (i.e gdalinfo/gdal_translate) work fine using the ECW/JP2ECW drivers. Running gdalinfo with the -stats flag on an ECW outputs the .aux.xml auxillary metadata file correctly.

comment:18 Changed 6 years ago by lpinner

Not sure whether it's ubuntugis or upstream gdal build scripts, but gdal-ecw-build fails on 32bit systems with the following error:

<snip>
configure: creating ./config.status
config.status: creating GDALmake.opt
config.status: WARNING:  'GDALmake.opt.in' seems to ignore the --datarootdir setting
config.status: executing libtool commands
sed: can't read ./ltmain.sh: No such file or directory
sed: can't read libtoolT: No such file or directory
g++ -g -O2 -fPIC  -Wall  -I/usr/include/gdal -DFRMT_ecw -I-I/usr/include/gdal -DHAVE_ECW_BUILDNUMBER_H -DLINUX -DX86 -DPOSIX -DHAVE_COMPRESS -DECW_COMPRESS_RW_SDK_VERSION -I/usr/local/ecwjp2_sdk//include  -c -o ecwdataset.o ecwdataset.cpp
In file included from /usr/local/ecwjp2_sdk//include/NCSMisc.h:30:0,
                 from /usr/local/ecwjp2_sdk//include/NCSString.h:38,
                 from /usr/local/ecwjp2_sdk//include/NCSThread.h:44,
                 from /usr/local/ecwjp2_sdk//include/NCSUtil.h:67,
                 from /usr/local/ecwjp2_sdk//include/NCSEcw/API/View.h:37,
                 from /usr/local/ecwjp2_sdk//include/NCSFile.h:18,
                 from gdal_ecw.h:59,
                 from ecwdataset.cpp:30:
/usr/lib/gcc/i686-linux-gnu/4.6/include/xmmintrin.h:32:3: error: #error "SSE instruction set not enabled"
make: *** [ecwdataset.o] Error 1

comment:19 in reply to:  14 Changed 6 years ago by lpinner

I finally got around to compiling gdal from source against the v5.0 ECW SDK (./configure --with-python=yes --with-ecw=/usr/local/ecwjp2_sdk).

That fixes the "undefined symbol: _ZTI14GDALPamDataset" error message when using the gdal python bindings which I got when using the UbuntuGIS python bindings.

from osgeo import gdal
ERROR 1: /usr/lib/gdalplugins/1.10/gdal_ECW_JP2ECW.so: undefined symbol: _ZTI14GDALPamDataset
ERROR 1: /usr/lib/gdalplugins/1.10/gdal_ECW_JP2ECW.so: undefined symbol: _ZTI14GDALPamDataset

comment:20 Changed 3 years ago by Bas Couwenberg

Resolution: invalid
Status: reopenedclosed

Apparently nobody handles Trac tickets any more, closing this ancient issue.

Note: See TracTickets for help on using tickets.