[gdal-dev] java-mac os - gdal / ogr missing libraries

Stefano Godi ste at archi-method.ch
Sat May 28 08:34:27 PDT 2022


I'm trying to read/access a geodatabase (.gdb folder) for extracting some data. I can access the database from terminal using
>ogrinfo test.gdb.zip
and as result i get
using driver `OpenFileGDB' successful.
Group separated:
  Layer: Floor (3D TIN)
  Layer: Wall (3D Multi Polygon)
  Layer: Roof (3D Multi Polygon)
Group solid:
  Layer: Roof_solid (3D Multi Polygon)
  Layer: Building_solid (3D TIN)
So GDAL is installed successfully in my computer.
Then, I need to automate the process inside a Java program. When I run the following block of commands ( for looking up which driver I can access, I need to access openFileGDB)
 OGRDataStoreFactory factory = new JniOGRDataStoreFactory();
        Set<String> drivers = factory.getAvailableDrivers();
        for (String driver : drivers) {
            System.out.println(driver);
        }
I obtain the following as error in console
java.lang.UnsatisfiedLinkError: no gdaljni in java.library.path: [/Users/steve/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .]
    at processing.opengl.PSurfaceJOGL.lambda$initAnimator$5(PSurfaceJOGL.java:477)
    at java.base/java.lang.Thread.run(Thread.java:829)
It seems that a gdalalljni library is missing, it is two days that I cannot solve this problem.
There's some that can access GDAL Java library with MacOS?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220528/837362c6/attachment-0001.htm>


More information about the gdal-dev mailing list