Skip to content

Commit

Permalink
Remove JP2Lura driver
Browse files Browse the repository at this point in the history
Fixes OSGeo#11109

Cf https://lists.osgeo.org/pipermail/gdal-dev/2024-October/059671.html:
"I discovered yesterday that the JP2Lura driver (JPEG2000 support through
proprietary LuraTech JPEG2000 SDK) had been totally broken during the
whole GDAL 3.9 series (the identification function would fail to detect
any JPEG2000 file). I've reached out to the initial proponents of the
driver and they no longer use it."
  • Loading branch information
rouault committed Oct 25, 2024
1 parent fc558b4 commit 655128f
Show file tree
Hide file tree
Showing 22 changed files with 5 additions and 6,713 deletions.
2,305 changes: 0 additions & 2,305 deletions autotest/gdrivers/jp2lura.py

This file was deleted.

2 changes: 1 addition & 1 deletion autotest/gdrivers/jp2metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

def have_jpeg2000_capable_driver():
# JP2MrSID doesn't manage to open data/jpeg2000/IMG_md_ple_R1C1.jp2
for drv_name in ["JP2KAK", "JP2LURA", "JP2ECW", "JP2OpenJPEG"]:
for drv_name in ["JP2KAK", "JP2ECW", "JP2OpenJPEG"]:
if gdal.GetDriverByName(drv_name):
return True
return False
Expand Down
21 changes: 4 additions & 17 deletions autotest/pymod/gdaltest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,11 @@
jp2ecw_drv = None
jp2mrsid_drv = None
jp2openjpeg_drv = None
jp2lura_drv = None
jp2kak_drv_unregistered = False
jpeg2000_drv_unregistered = False
jp2ecw_drv_unregistered = False
jp2mrsid_drv_unregistered = False
jp2openjpeg_drv_unregistered = False
jp2lura_drv_unregistered = False

###############################################################################

Expand Down Expand Up @@ -1264,8 +1262,8 @@ def compare_ds(ds1, ds2, xoff=0, yoff=0, width=0, height=0, verbose=1):


def deregister_all_jpeg2000_drivers_but(name_of_driver_to_keep):
global jp2kak_drv, jpeg2000_drv, jp2ecw_drv, jp2mrsid_drv, jp2openjpeg_drv, jp2lura_drv
global jp2kak_drv_unregistered, jpeg2000_drv_unregistered, jp2ecw_drv_unregistered, jp2mrsid_drv_unregistered, jp2openjpeg_drv_unregistered, jp2lura_drv_unregistered
global jp2kak_drv, jpeg2000_drv, jp2ecw_drv, jp2mrsid_drv, jp2openjpeg_drv
global jp2kak_drv_unregistered, jpeg2000_drv_unregistered, jp2ecw_drv_unregistered, jp2mrsid_drv_unregistered, jp2openjpeg_drv_unregistered

# Deregister other potential conflicting JPEG2000 drivers that will
# be re-registered in the cleanup
Expand Down Expand Up @@ -1299,12 +1297,6 @@ def deregister_all_jpeg2000_drivers_but(name_of_driver_to_keep):
jp2openjpeg_drv.Deregister()
jp2openjpeg_drv_unregistered = True

jp2lura_drv = gdal.GetDriverByName("JP2Lura")
if name_of_driver_to_keep != "JP2Lura" and jp2lura_drv:
gdal.Debug("gdaltest.", "Deregistering JP2Lura")
jp2lura_drv.Deregister()
jp2lura_drv_unregistered = True

return True


Expand All @@ -1314,8 +1306,8 @@ def deregister_all_jpeg2000_drivers_but(name_of_driver_to_keep):


def reregister_all_jpeg2000_drivers():
global jp2kak_drv, jpeg2000_drv, jp2ecw_drv, jp2mrsid_drv, jp2openjpeg_drv, jp2lura_drv
global jp2kak_drv_unregistered, jpeg2000_drv_unregistered, jp2ecw_drv_unregistered, jp2mrsid_drv_unregistered, jp2openjpeg_drv_unregistered, jp2lura_drv_unregistered
global jp2kak_drv, jpeg2000_drv, jp2ecw_drv, jp2mrsid_drv, jp2openjpeg_drv
global jp2kak_drv_unregistered, jpeg2000_drv_unregistered, jp2ecw_drv_unregistered, jp2mrsid_drv_unregistered, jp2openjpeg_drv_unregistered

if jp2kak_drv_unregistered:
jp2kak_drv.Register()
Expand All @@ -1342,11 +1334,6 @@ def reregister_all_jpeg2000_drivers():
jp2openjpeg_drv_unregistered = False
gdal.Debug("gdaltest", "Registering JP2OpenJPEG")

if jp2lura_drv_unregistered:
jp2lura_drv.Register()
jp2lura_drv_unregistered = False
gdal.Debug("gdaltest", "Registering JP2Lura")

return True


Expand Down
1 change: 0 additions & 1 deletion cmake/helpers/CheckDependentLibraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,6 @@ option(GDAL_USE_PUBLICDECOMPWT

# proprietary libraries KAKADU
include(CheckDependentLibrariesKakadu)
gdal_check_package(LURATECH "Enable JP2Lura driver" CAN_DISABLE)

include(CheckDependentLibrariesArrowParquet)

Expand Down
35 changes: 0 additions & 35 deletions cmake/modules/packages/FindLURATECH.cmake

This file was deleted.

21 changes: 0 additions & 21 deletions doc/source/development/building_from_source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1202,27 +1202,6 @@ capabilities in GMLJP2v2 generation.
Control whether to use LibXml2. Defaults to ON when LibXml2 is found.


LURATECH
********

The Luratech JPEG2000 SDK (closed source/proprietary) is required for the
:ref:`raster.jp2lura` driver.

LURATECH_ROOT or CMAKE_PREFIX_PATH should point to the directory of the SDK.

.. option:: LURATECH_INCLUDE_DIR

Path to the include directory with the ``lwf_jp2.h`` header file.

.. option:: LURATECH_LIBRARY

Path to library file lib_lwf_jp2.a / lwf_jp2.lib

.. option:: GDAL_USE_LURATECH=ON/OFF

Control whether to use LURATECH. Defaults to ON when LURATECH is found.


LZ4
***

Expand Down
1 change: 0 additions & 1 deletion doc/source/drivers/raster/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ Raster drivers
jdem
jp2ecw
jp2kak
jp2lura
jp2mrsid
jp2openjpeg
jpeg
Expand Down
Loading

0 comments on commit 655128f

Please sign in to comment.