Opened 16 years ago
Closed 16 years ago
#2320 closed defect (fixed)
JPEG2000 is not listed in the formats output by gdalinfo when ecw is built as a plugin
Reported by: | nsavard | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.3 |
Component: | GDAL_Raster | Version: | 1.5.0 |
Severity: | normal | Keywords: | ECW JP2ECW |
Cc: | frankie |
Description
I created a gdal_ecw plugin with fgs and installed it through the fgs installer but when I issue a gdalinfo --formats, JPEG2000 is not shown.
Change History (7)
comment:1 by , 16 years ago
Milestone: | 1.5.2 |
---|---|
Resolution: | → invalid |
Status: | new → closed |
comment:2 by , 16 years ago
Keywords: | ECW JP2ECW added |
---|---|
Milestone: | → 1.6.0 |
Resolution: | invalid |
Status: | closed → reopened |
I believe the problem is that the plugin system ends up calling GDALRegister_ECW() (because the plugin is named gdal_ECW.so) and GDALRegister_JP2ECW() never gets calls. This means the JP2ECW driver isn't available, even though it is desirable that it would be.
I can imagine a few ways to correct this, but I don't find any of them appealing:
- Build differently if we are building as a plugin, only exporting GDALRegisterMe() which would call static GDALRegister_ECW() and GDALRegister_JP2ECW() functions.
- modify GDALRegister_ECW() to call GDALRegister_JP2ECW().
Actually, on reflection a reasonably non-disruptive change would be to build the plugin as gdal_ECW_JP2ECW.so and add a GDALRegister_ECW_JP2ECW() function that calls both registration functions. The ecwdataset.cpp code would not need to "know" if it is going to be a plugin at build time so things remain fairly simple and clean.
I'm going to turn this over to Matuesz to implement. Mateusz, I think it is sufficient to do this in trunk to avoid disruptive changes in 1.5 branch.
comment:3 by , 16 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Status: | reopened → new |
comment:5 by , 16 years ago
Cc: | added |
---|
comment:6 by , 16 years ago
Cc: | removed |
---|---|
Owner: | changed from | to
I find myself needing this too for OSGeo4W, so I'll take care of it now.
comment:7 by , 16 years ago
Milestone: | 1.6.0 → 1.5.3 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
I have made changes so that on win32 and Unix the plugin is built as gdal_ECW_JP2ECW.dll/so. I also added a new GDALRegister_ECW_JP2ECW() registration function. So when the plugin is loaded both drivers now get registered by default.
Changes are in trunk (r14743, r14745) and 1.5 branch (r14744, r14746).
The fixes will appear first in GDAL 1.5.3.
I think that's prefectly normal. The Jpeg2000 driver inside the gdal_ecw plugin is named "JP2ECW" and not "JPEG2000". So I'm closing this bug as an invalid.