Skip to main content
100%

Install GDAL with Java bindings on macOS High Sierra

✓ Published0🌍 Public
BBrideau
Last edited Nov 24, 2017
Created on Nov 23, 2017

This example shows how to read a GeoPackage and a GeoJSON file with GDAL’s OGR Java bindings in Scala, printing each dataset’s EPSG spatial reference code. It demonstrates both a blocking call and a non‑blocking variant using `scala.concurrent.Future`. The code registers OGR drivers with `ogr.RegisterAll()`, opens files via `ogr.OpenShared()`, and retrieves the layer’s spatial reference with `layer.GetSpatialRef()` before calling `srs.AutoIdentifyEPSG` and `srs.GetAuthorityCode(null)`. The build relies on `org.gdal:gdal:2.2.1` from the Boundless repository.

AI-generated description

Similar vizzes