Hi Duane,

we integrated GDAL 2.2.3 successfully with geotools 19, using the following 
steps:

  *   downloaded precompiled binaries 
(https://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries)
  *   put the java bindings, that correspond with the precompiled binaries on 
the class path (gdal.jar)
  *   delete the old version gdal java binding jar 
imageio-ext-gdal-bindings-X.jar, that was shipped with imageio
  *   put the precompiled binaries in one of the standard gdal driver paths or 
set environment variable 
(https://trac.osgeo.org/gdal/wiki/ConfigOptions#GDAL_DRIVER_PATH)
  *   check, if declaration of gdal_data is needed on your operating system 
(https://trac.osgeo.org/gdal/wiki/ConfigOptions#GDAL_DATA)

Then you should see something like this:
Jan 10, 2019 3:44:04 PM it.geosolutions.imageio.gdalframework.GDALUtilities 
loadGDAL
INFORMATION: GDAL Native Library loaded (version: 2.2.3)

Hendrik

Von: Duane Zamrok <zam...@cubrc.org>
Gesendet: Donnerstag, 10. Januar 2019 15:30
An: 'GeoTools-GT2-Users@lists.sourceforge.net' 
<GeoTools-GT2-Users@lists.sourceforge.net>
Betreff: [Geotools-gt2-users] gt-imageio-ext-gdal

I'm attempting to use the following dependency to read a file in the DTED 
format.
<dependency>
                <groupId>org.geotools</groupId>
                <artifactId>gt-imageio-ext-gdal</artifactId>
                <version>20.1</version>
</dependency>

>From what I can tell, gt-imageio-ext-gdal is dependant on 
>imageio-ext-gdalframework-1.1.27 which seems to require that I have the JNI 
>bindings installed for GDAL 1.9.2.

Looking at the imageio-ext project, version 1.1.27 was released October of 2018 
and does in fact include 1.9.2 native libraries in its release. However, all of 
the precompiled binaries are for older OS versions. Redhat 6 is the newest OS 
represented and I can't seem to find precompiled binaries anywhere for RHEL7 or 
newer versions of Ubuntu.

I notice that GDAL is well past 1.9.2 and is already deploying version 2.2+ as 
part of apt-get/yum, but using newer versions of the bindings does not appear 
to work since I get this stack trace if I try.

Jan 10, 2019 9:29:12 AM it.geosolutions.imageio.gdalframework.GDALUtilities 
loadGDAL
INFO: Failed to load the GDAL native libs from "gdalalljni". Falling back to 
"gdaljni".
java.lang.UnsatisfiedLinkError: no gdalalljni in java.library.path
Jan 10, 2019 9:29:12 AM it.geosolutions.imageio.gdalframework.GDALUtilities 
loadGDAL
WARNING: Failed to load the GDAL native libs. This is not a problem unless you 
need to use the GDAL plugins: they won't be enabled.
java.lang.UnsatisfiedLinkError: no gdaljni in java.library.path
Exception in thread "main" java.lang.IllegalStateException: GDAL native 
libraries are not available.
                at 
it.geosolutions.imageio.gdalframework.GDALImageReader.setInput(GDALImageReader.java:636)
                at javax.imageio.ImageReader.setInput(ImageReader.java:380)
                at 
org.geotools.coverageio.BaseGridCoverage2DReader.<init>(BaseGridCoverage2DReader.java:164)
                at 
org.geotools.coverageio.gdal.BaseGDALGridCoverage2DReader.<init>(BaseGDALGridCoverage2DReader.java:77)
                at 
org.geotools.coverageio.gdal.dted.DTEDReader.<init>(DTEDReader.java:56)
                at 
org.geotools.coverageio.gdal.dted.DTEDReader.<init>(DTEDReader.java:45)
                at 
org.cubrc.example.geotools.egm96.Egm96QueryTest.main(Egm96QueryTest.java:17)

Is there some other way of acquiring the bindings at this point, so people have 
stopped deploying against newer OS or should is the normal process to compile 
the bindings yourself?

________________________________
IBYKUS AG f?r Informationstechnologie, Erfurt / HRB 108616 - D-Jena / Vorstand: 
Helmut C. Henkel, Eckehart Klingner
Vorsitzender des Aufsichtsrates: Dr. Helmut Vorndran
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to