Opened 12 years ago

Closed 12 years ago

#280 closed task (fixed)

Create ECW plugin for gdal-1.9

Reported by: jpalmer Owned by: warmerdam
Priority: major Component: Package
Version: Keywords: pkg-gdal-ecw
Cc: jef

Description

Really useful for QGIS users

Change History (10)

comment:1 by warmerdam, 12 years ago

Keywords: pkg-gdal-ecw added; QGIS ECW removed
Owner: changed from osgeo4w-dev@… to warmerdam

I will try to prepare it this weekend. I will update the ticket when it is ready for testing.

comment:2 by warmerdam, 12 years ago

Cc: jef added
Status: newassigned

I have packaged gdal-ecw-1.9.0-0 and now it should be possible to use it with GDAL on OSGeo4W per instructions in http://trac.osgeo.org/osgeo4w/wiki/pkg-gdal-ecw

+jef

I see it does not currently work because the qgis.bat evilly sets GDAL_DRIVER_PATH. If this needs to be set it should be delgated to the gdal.bat file and anyways it is not supposed to include the version subdirectory. This completely defeats the ability of GDAL to pick up only the dlls of the proper version.

in reply to:  2 ; comment:3 by jef, 12 years ago

Replying to warmerdam:

I see it does not currently work because the qgis.bat evilly sets GDAL_DRIVER_PATH. If this needs to be set it should be delgated to the gdal.bat file and anyways it is not supposed to include the version subdirectory. This completely defeats the ability of GDAL to pick up only the dlls of the proper version.

fixed in qgis and qgis-dev

comment:4 by avlisad, 12 years ago

Since different versions of QGis and gdal(lib) can coexist and only QGis needs GDAL_DRIVER_PATH to be set in order to find gdal plugins, that variable must be set in qgis.bat and qgis-dev.bat to %OSGEO4W_ROOT%\bin\gdalplugins\@GDAL_VERSION@, where @GDAL_VERSION@ is the version of gdal used to build QGis.

in reply to:  4 comment:5 by jef, 12 years ago

Replying to avlisad:

Since different versions of QGis and gdal(lib) can coexist and only QGis needs GDAL_DRIVER_PATH to be set in order to find gdal plugins, that variable must be set in qgis.bat and qgis-dev.bat to %OSGEO4W_ROOT%\bin\gdalplugins\@GDAL_VERSION@, where @GDAL_VERSION@ is the version of gdal used to build QGis.

What's your point? QGIS is built with 1.9 (but yes, the entry was still from when GDAL 1.7 was the default GDAL in OSGeo4W and QGIS was build with 1.8).

in reply to:  3 comment:6 by jef, 12 years ago

Replying to jef:

Replying to warmerdam:

I see it does not currently work because the qgis.bat evilly sets GDAL_DRIVER_PATH. If this needs to be set it should be delgated to the gdal.bat file and anyways it is not supposed to include the version subdirectory. This completely defeats the ability of GDAL to pick up only the dlls of the proper version.

fixed in qgis and qgis-dev

Actually that didn't fix it. GDAL retrieves the path of the calling .exe which apps/qgis(-dev)/qgis.exe for QGIS. So GDAL search in in apps/qgis(-dev)/bin/gdalplugins. The batch files now set GDAL_DRIVER_PATH to 1.9, but that could also be fixed in etc/ini/gdal.bat.

comment:7 by warmerdam, 12 years ago

right - the correct fix is for gdal's ini .bat to set this. I will correct.

in reply to:  2 comment:8 by andreaerdna, 12 years ago

Replying to warmerdam:

I have packaged gdal-ecw-1.9.0-0

is the OSGeo4W gdal-ecw-1.9.0-0 package compiled against 4.2 ERDAS ECW RO SDK or 4.1? gdalinfo --formats now reports "ECW (rov): ERDAS Compressed Wavelets (SDK 4.2)": is it correct? In this case I think we have to update http://trac.osgeo.org/osgeo4w/wiki/pkg-gdal-ecw and create http://trac.osgeo.org/osgeo4w/wiki/pkg-gdal18-ecw and probably also a gdal18-ecw package. However, it seems to work either with 4.1 SDK DLLs or 4.2 SDK DLLs.

comment:9 by warmerdam, 12 years ago

I thought I had done it with the 4.1 but I'll review tonight.

comment:10 by warmerdam, 12 years ago

Resolution: fixed
Status: assignedclosed

gdal.bat has been updated to set GDAL_DRIVER_PATH in the gdal package.

While I recorded the ECW SDK as being 4.1 when I dig into the include file version it records 4.2.1. I don't know if there was an error on my part or there's though I suspect mine.

So it seems it is really 4.2 though I'm pleased to hear the 4.1 DLLs also work.

Note: See TracTickets for help on using tickets.