openjump-gis / openjump

OpenJUMP, the Open Source GIS with more than one trick in its kangaroo pocket, takes the leap from svn to git. join the effort!
http://openjump.org
GNU General Public License v2.0
30 stars 14 forks source link

Reading jpeg 2000 #106

Closed mukoki closed 6 months ago

mukoki commented 8 months ago

At the moment I currently use two well-known image formats which gradually lead me to use qgis rather than OpenJUMP : jp2 and COG. OpenJUMP has several jp2 drivers, but I could never read jp2 images correctly with them (I generally get a very low resolution image if any). I just included a new java driver based on OpenJPEG : https://github.com/dbmdz/imageio-jnr It is OK for my use, but It still misses native libraries for linuw/osx. Should not be difficult to add though. It has another major drawback : it can't read jp2 georeferencing tags. For now on, I managed georeferencement from .j2w or .tab, but I hope that at some point, imageio-jnr will make it possible to get jp2 geo-metadata. @edeso , maybe you would like to have a look at it and include other native libs

About COG, it is basically a GeoTiff file following some conventions to wrap a pyramid of images making it efficient at different scales.

jratike80 commented 8 months ago

There is a PR that has been open for 6 years soon https://github.com/uclouvain/openjpeg/issues/1109. I do not understand how GDAL can write and read those associated boxes for GeoJP2 and GMLJP2.

When it comes to COG, I think that the idea behind using COG in an efficient way is that the client does not read the whole image but only the area or the map window, and at a reasonable resolution. I believe that OpenJUMP currently needs to read the whole TIFF image. However, the ECW driver and WMS driver work in that way and they request new data after each pan/zoom so we have some code for such usage.

As a workaround I have sometimes been running Mapserver or Geoserver in localhost for serving WMS layers to OpenJUMP. You could try the same with QGIS Server.

edeso commented 8 months ago

Mike, Jukka,

  1. did you ever install the GDAL-libs and tried the ImageIO-Ext OpenJPEG driver? that should be the most versatile.
  2. do you have test images?
  3. how are JP2 files supposed to keep there referencing. is there some standard aside from sidecar files?
mukoki commented 8 months ago
  1. forgot that there is some lib to install for gdal. Just tried to follow instruction found in https://ojwiki.soldin.de/index.php?title=Working_with_Raster but did not suceed (generally, I get the message "Can't register JP2GDAL readers.")*
  2. you can download orthophotographies of France here : https://geoservices.ign.fr/telechargement-api/BDORTHO?zone=D075 (I selected Paris as it should be smaller than other regions, also old ones are smaller (0.5m resolution) than new ones (0.15)
  3. As mentioned by Jukka, there are two ways to represent georeferencing in jp2 metadata, but I don't know more about it (seems to me that it is more common to use internal metadata than sidecar files for jp2).
jratike80 commented 8 months ago

3a. The GMLJP2 standard is https://docs.ogc.org/is/08-085r4/08-085r4.html but I think that it is not realistic that OpenJUMP would do the low level access to the JPEG2000 code stream and boxes. But if the JPEG2000 library can do that and return the raw GML from the box it is not so hard to read the coordinate system, origin, and pixel size.

3b. The GeoJP2 system is older and the copyright belongs now to the company Extensis. Thet y have removed the specification from the web but the idea and a Timemachine link are expressed in https://github.com/opengeospatial/geotiff/issues/97#issuecomment-929196283. The idea is simply to insert a 1x1 pixel sized GeoTIFF image with all the geotiff tags that are needed inside JPEG2000 into a box. Here again it may be unrealistic to make OpenJUMP to extract the box, but when the GeoTIFF is out than any GeoTIFF driver has the capabilities to read the georeferencing.

I wonder if someone has already written an utility that can read JPEG2000 and extract the georeferencing into an external file, for example in the .aux.xml format that GDAL is using. Such utility would not need to understand everything about JPEG200, just how to export the contents of certain boxes.

EDIT Had a try with Exiftool and it does find the necessary information. There must be other utilities that can do the same. Imageio: https://jai-imageio.github.io/jai-imageio-jpeg2000/javadoc/com/sun/media/imageioimpl/plugins/jpeg2000/XMLBox.html

Exiftool usage example:

exiftool -xml -b 1mm.jp2
<gml:FeatureCollection
   xmlns:gml="http://www.opengis.net/gml"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlJP2Profile/1.0.0/gmlJP2Profile.xsd">
  <gml:boundedBy>
    <gml:Envelope srsName="urn:ogc:def:crs:EPSG::32631">
      <gml:lowerCorner>1000000 1000000</gml:lowerCorner>
      <gml:upperCorner>1000002 1000002</gml:upperCorner>
    </gml:Envelope>
  </gml:boundedBy>
  <gml:featureMember>
    <gml:FeatureCollection>
      <gml:featureMember>
        <gml:RectifiedGridCoverage dimension="2" gml:id="RGC0001">
          <gml:rectifiedGridDomain>
            <gml:RectifiedGrid dimension="2">
              <gml:limits>
                <gml:GridEnvelope>
                  <gml:low>0 0</gml:low>
                  <gml:high>1999 6</gml:high>
                </gml:GridEnvelope>
              </gml:limits>
              <gml:axisName>x</gml:axisName>
              <gml:axisName>y</gml:axisName>
              <gml:origin>
                <gml:Point gml:id="P0001" srsName="urn:ogc:def:crs:EPSG::32631">
                  <gml:pos>1000000.0005 1000001.85714286</gml:pos>
                </gml:Point>
              </gml:origin>
              <gml:offsetVector srsName="urn:ogc:def:crs:EPSG::32631">0.001 0</gml:offsetVector>
              <gml:offsetVector srsName="urn:ogc:def:crs:EPSG::32631">0 -0.285714285714286</gml:offsetVector>
            </gml:RectifiedGrid>
          </gml:rectifiedGridDomain>
          <gml:rangeSet>
            <gml:File>
              <gml:rangeParameters/>
              <gml:fileName>gmljp2://codestream/0</gml:fileName>
              <gml:fileStructure>Record Interleaved</gml:fileStructure>
            </gml:File>
          </gml:rangeSet>
        </gml:RectifiedGridCoverage>
      </gml:featureMember>
    </gml:FeatureCollection>
  </gml:featureMember>
</gml:FeatureCollection>
edeso commented 8 months ago

hey Mike,

a quick test with OJ 2.2.1 Plus and https://sourceforge.net/projects/jump-pilot/files/OpenJUMP_plugins/Drivers/GDAL-win-x86x64-3.5.0stable-20220620.zip loads a JP2 from BDORTHO_2-0_RVB-0M50_JP2-E080_LAMB93_D075_2011-01-01.7z. loading took 18s

see Screenshot 2024-03-11 180530

log output looks like

Using 'java' found in 'C:\Program Files\Eclipse Adoptium\jdk-17.0.8.101-hotspot\bin\' openjdk version "17.0.8.1" 2023-08-24; OpenJDK Runtime Environment Temurin-17.0.8.1+1 (build 17.0.8.1+1); OpenJDK 64-Bit Server VM Temurin-17.0.8.1+1 (build 17.0.8.1+1 mixed mode sharing) ---CLASSPATH--- lib\native\gdal-win-x64\bin\gdal\java\gdal.jar;.;bin;lib\batik-awt-util-1.6-1.jar;lib\batik-bridge-1.6-1.jar;lib\batik-css-1.6-1.jar;lib\batik-dom-1.6-1.jar;lib\batik-ext-1.6-1.jar;lib\batik-gui-util-1.6-1.jar;lib\batik-gvt-1.6-1.jar;lib\batik-parser-1.6-1.jar;lib\batik-script-1.6-1.jar;lib\batik-svg-dom-1.6-1.jar;lib\batik-svggen-1.6-1.jar;lib\batik-transcoder-1.6-1.jar;lib\batik-util-1.6-1.jar;lib\batik-xml-1.6-1.jar;lib\bsh-2.0b6.jar;lib\buoy-1.9.jar;lib\commons-codec-1.15.jar;lib\commons-compress-1.21.jar;lib\commons-imaging-1.0-alpha3.jar;lib\commons-io-2.11.0.jar;lib\commons-lang3-3.12.0.jar;lib\commons-logging-1.2.jar;lib\cts-1.5.2.jar;lib\gdal-3.5.0.jar;lib\jai-imageio-core-1.4.0.jar;lib\jai_codec-1.1.3.jar;lib\jai_core-1.1.3.jar;lib\jai_imageio-1.1.jar;lib\jama-1.0.3.jar;lib\jdom2-2.0.6.jar;lib\JMathArray-1.0.jar;lib\JMathIO-1.0.jar;lib\JMathPlot-1.0.1.jar;lib\json-simple-1.1.1.jar;lib\jts-core-1.19.0.jar;lib\jts-io-common-1.19.0.jar;lib\jython-2.2.1.jar;lib\log4j-1.2.17.jar;lib\OpenJUMP-2.2.1-r5222[94156e5]-nosrc.jar;lib\org-netbeans-swing-outline-7.2.jar;lib\slf4j-api-1.7.25.jar;lib\xercesImpl-2.12.2.jar;lib\xml-apis-1.4.01.jar;lib\xz-1.9.jar;lib\native\jecw-0.0.7.jar ---PATH--- lib\native\gdal-win-x64\bin;lib\native\gdal-win-x64\bin\gdal\java;lib\native\ten64-x64;lib\native\ten64;lib\native\ten-x64;lib\native\ten;lib\native\x64;lib\native;lib\ext;C:\Program Files (x86)\VMware\VMware Workstation\bin\;C:\Program Files\Eclipse Adoptium\jdk-17.0.8.101-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\WireGuard\;C:\Program Files\Git\cmd;C:\Users\ed\AppData\Local\Microsoft\WindowsApps; ---Save logs & state to--- M:_Desktop\OJ\OpenJUMP-2.2.1-r5222[94156e5]-PLUS\bin.. ---Detect maximum memory limit--- set Xmx to 16267M (ram maximum) ---Start OJ--- OpenJDK 64-Bit Server VM warning: Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "com.vividsolutions.jump.workbench.plugin.PlugInClassLoader"). To use archived non-system classes, this property must not be set [INFO] 17:59:35.500 Scanning lib\ext took 6,69s. Found 24 configurations.

SNIP

[INFO] 17:59:41.598 Loading Config CSV Driver 2.0.0 (2021-08-22) took 0,05s [INFO] 17:59:41.617 Loading Config DXF driver 2.0.0 (2021-08-22) took 0,01s ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_GEOR.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_GEOR.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\ogr_OCI.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\ogr_OCI.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_GEOR.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_GEOR.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\ogr_OCI.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\ogr_OCI.dll 126: The specified module could not be found.

Mõrz 11, 2024 5:59:42 PM it.geosolutions.imageio.gdalframework.GDALUtilities loadGDAL INFO: GDAL Native Library loaded (version: 3.5.0) Mõrz 11, 2024 5:59:42 PM it.geosolutions.imageio.plugins.turbojpeg.TurboJpegUtilities loadTurboJpeg WARNING: Failed to load the TurboJpeg native libs. This is not a problem, but the TurboJpeg encoder won't be available: java.lang.UnsatisfiedLinkError: no turbojpeg in java.library.path: C:\Program Files\Eclipse Adoptium\jdk-17.0.8.101-hotspot\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;lib\native\gdal-win-x64\bin;lib\native\gdal-win-x64\bin\gdal\java;lib\native\ten64-x64;lib\native\ten64;lib\native\ten-x64;lib\native\ten;lib\native\x64;lib\native;lib\ext;C:\Program Files (x86)\VMware\VMware Workstation\bin\;C:\Program Files\Eclipse Adoptium\jdk-17.0.8.101-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\WireGuard\;C:\Program Files\Git\cmd;C:\Users\ed\AppData\Local\Microsoft\WindowsApps;;. Mõrz 11, 2024 5:59:42 PM it.geosolutions.util.KakaduUtilities loadKakadu WARNING: Failed to load the Kakadu native libs. This is not a problem unless you need to use the Kakadu plugin: it won't be enabled. java.lang.UnsatisfiedLinkError: no kdu_jni in java.library.path: C:\Program Files\Eclipse Adoptium\jdk-17.0.8.101-hotspot\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;lib\native\gdal-win-x64\bin;lib\native\gdal-win-x64\bin\gdal\java;lib\native\ten64-x64;lib\native\ten64;lib\native\ten-x64;lib\native\ten;lib\native\x64;lib\native;lib\ext;C:\Program Files (x86)\VMware\VMware Workstation\bin\;C:\Program Files\Eclipse Adoptium\jdk-17.0.8.101-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\WireGuard\;C:\Program Files\Git\cmd;C:\Users\ed\AppData\Local\Microsoft\WindowsApps;;. [INFO] 17:59:47.304 Loading Config Fill Patterns 2.1.1 [main/a2ecac2/2022-01-16T00:50:17+0100] took 5,69s

SNIP

[INFO] 17:59:54.408 Loading Config View Manager Extension (MichaÙl Michaud) 2.0.4 [main/7e12812/2022-08-28T17:55:36+0200] took 0,56s [INFO] 17:59:54.408 Loading all OJ extensions took 13,47s [ERROR] 17:59:54.657 ECW/JP2 native libs not installed. reason: no jecw in java.library.path: C:\Program Files\Eclipse Adoptium\jdk-17.0.8.101-hotspot\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;lib\native\gdal-win-x64\bin;lib\native\gdal-win-x64\bin\gdal\java;lib\native\ten64-x64;lib\native\ten64;lib\native\ten-x64;lib\native\ten;lib\native\x64;lib\native;lib\ext;C:\Program Files (x86)\VMware\VMware Workstation\bin\;C:\Program Files\Eclipse Adoptium\jdk-17.0.8.101-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\WireGuard\;C:\Program Files\Git\cmd;C:\Users\ed\AppData\Local\Microsoft\WindowsApps;;. [INFO] 17:59:54.659 ECW/JP2 SDK loader will be unavailable. [INFO] 17:59:54.804 mrsidgeodecode not installed. - mrsidgeodecode not in path [INFO] 17:59:55.469 OJ start took 28,48s alltogether. [INFO] 17:59:56.212 Task added : Project 1 [INFO] 18:00:50.495 Executing Open... ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_GEOR.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_GEOR.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\ogr_OCI.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\ogr_OCI.dll 126: The specified module could not be found.

Warning 1: Unable to find driver ESRI to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver Shapefile to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver MapInfo to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver File to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver UK to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver .NTF to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver Interlis to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver 1 to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver Interlis to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver 2 to unload from GDAL_SKIP environment variable. ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_GEOR.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_GEOR.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\ogr_OCI.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\ogr_OCI.dll 126: The specified module could not be found.

Warning 1: Unable to find driver ESRI to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver Shapefile to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver MapInfo to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver File to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver UK to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver .NTF to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver Interlis to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver 1 to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver Interlis to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver 2 to unload from GDAL_SKIP environment variable. ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_GEOR.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_GEOR.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\ogr_OCI.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\ogr_OCI.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_GEOR.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_GEOR.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\ogr_OCI.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\ogr_OCI.dll 126: The specified module could not be found.

Warning 1: Unable to find driver ESRI to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver Shapefile to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver MapInfo to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver File to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver UK to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver .NTF to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver Interlis to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver 1 to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver Interlis to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver 2 to unload from GDAL_SKIP environment variable. [INFO] 18:01:29.304 Done. Current committed memory:plugin.AbstractPlugIn.executing = Executing419 MB [INFO] 18:01:35.576 Gesture Finished:: Zoom In/Out [INFO] 18:01:37.253 Gesture Finished:: Zoom In/Out

edeso commented 8 months ago

just for fun also tried recent jdk-21.0.2+13.x64-adoptium and quickly assembled https://sourceforge.net/projects/jump-pilot/files/OpenJUMP_plugins/Drivers/GDAL-win-x86x64-3.8.4stable-20240311.zip .

loads as well, albeit it seems twice slower for some reason.

can anyone of you confirm that it works in general?

Using set "JAVA_HOME=E:\Programme\jdk-21.0.2+13.x64-adoptium" . Using 'java' found in 'E:\Programme\jdk-21.0.2+13.x64-adoptium\bin\' openjdk version "21.0.2" 2024-01-16 LTS; OpenJDK Runtime Environment Temurin-21.0.2+13 (build 21.0.2+13-LTS); OpenJDK 64-Bit Server VM Temurin-21.0.2+13 (build 21.0.2+13-LTS mixed mode sharing) ---CLASSPATH--- lib\native\gdal-win-x64\bin\gdal\java\gdal.jar;.;bin;lib\batik-awt-util-1.6-1.jar;lib\batik-bridge-1.6-1.jar;lib\batik-css-1.6-1.jar;lib\batik-dom-1.6-1.jar;lib\batik-ext-1.6-1.jar;lib\batik-gui-util-1.6-1.jar;lib\batik-gvt-1.6-1.jar;lib\batik-parser-1.6-1.jar;lib\batik-script-1.6-1.jar;lib\batik-svg-dom-1.6-1.jar;lib\batik-svggen-1.6-1.jar;lib\batik-transcoder-1.6-1.jar;lib\batik-util-1.6-1.jar;lib\batik-xml-1.6-1.jar;lib\bsh-2.0b6.jar;lib\buoy-1.9.jar;lib\commons-codec-1.15.jar;lib\commons-compress-1.21.jar;lib\commons-imaging-1.0-alpha3.jar;lib\commons-io-2.11.0.jar;lib\commons-lang3-3.12.0.jar;lib\commons-logging-1.2.jar;lib\cts-1.5.2.jar;lib\gdal-3.5.0.jar;lib\jai-imageio-core-1.4.0.jar;lib\jai_codec-1.1.3.jar;lib\jai_core-1.1.3.jar;lib\jai_imageio-1.1.jar;lib\jama-1.0.3.jar;lib\jdom2-2.0.6.jar;lib\JMathArray-1.0.jar;lib\JMathIO-1.0.jar;lib\JMathPlot-1.0.1.jar;lib\json-simple-1.1.1.jar;lib\jts-core-1.19.0.jar;lib\jts-io-common-1.19.0.jar;lib\jython-2.2.1.jar;lib\log4j-1.2.17.jar;lib\OpenJUMP-2.2.1-r5222[94156e5]-nosrc.jar;lib\org-netbeans-swing-outline-7.2.jar;lib\slf4j-api-1.7.25.jar;lib\xercesImpl-2.12.2.jar;lib\xml-apis-1.4.01.jar;lib\xz-1.9.jar;lib\native\jecw-0.0.7.jar ---PATH--- lib\native\gdal-win-x64\bin;lib\native\gdal-win-x64\bin\gdal\java;lib\native\ten64-x64;lib\native\ten64;lib\native\ten-x64;lib\native\ten;lib\native\x64;lib\native;lib\ext;C:\Program Files (x86)\VMware\VMware Workstation\bin\;C:\Program Files\Eclipse Adoptium\jdk-17.0.8.101-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\WireGuard\;C:\Program Files\Git\cmd;C:\Users\ed\AppData\Local\Microsoft\WindowsApps;

SNIP

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_GEOR.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_GEOR.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_MrSID.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_MrSID.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\ogr_OCI.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\ogr_OCI.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_GEOR.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_GEOR.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_MrSID.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\gdal_MrSID.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\ogr_OCI.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: lib\native\gdal-win-x64\bin\gdal\plugins\ogr_OCI.dll 126: The specified module could not be found.

März 11, 2024 6:57:23 PM it.geosolutions.imageio.gdalframework.GDALUtilities loadGDAL INFO: GDAL Native Library loaded (version: 3.8.4)

edeso commented 8 months ago

just noticed that you (Mike) added

A lib/native/x64/openjp2.dll

this'll probably clash with the openjp2.dll provided by GDAL.might explain your Can't register JP2GDAL readers.

mukoki commented 8 months ago

Hi Ede, I could finally install gdal. Just had to copy gdal-win-x64 "beside" x64 folder, not "inside". Works pretty well. First load is a bit slow (10 s on my machine while the new plugin displays the same image in less than a second), but after that, navigation with gdal is a bit faster than with the new plugin. Good to know. Installing a 150M dependency (twice the size of OpenJUMP), is probably not optimal, but I know there is a lot of stuff coming with gdal. Also I will test it with some other interesting formats like bigtiff and COG now that I know how to install it ;-) Jukka has also good hints to read jp2 metadata. If I can find a way to do it, having a jp2 driver which is less than 1M and does not need additional installation is good. I don't know if the added openjp2.dll and the gdal one may clash but If gdal is properly installed, I can drop the dll I added. Not sure I want to replace a 350k dll by a 150M dependency though. Thank you for the help

edeso commented 8 months ago

I could finally install gdal. Just had to copy gdal-win-x64 "beside" x64 folder, not "inside".

that's explained in the accompanying INSTALL-xxx.txt inside the Zip-File. any suggestion to improve documentation i'm all ears.

I don't know if the added openjp2.dll and the gdal one may clash but If gdal is properly installed, I can drop the dll I added. Not sure I want to replace a 350k dll by a 150M dependency though.

we may be able to strip out the files needed for GDAL support. just never took the time to do so. maybe one of you want's to tackle that ;)

mukoki commented 6 months ago

new JP2 driver added on march, between 10 and 30