Module org.apache.sis.storage.gdal


module org.apache.sis.storage.gdal
Bridge to the GDAL library for reading rasters. This module assumes that GDAL 3.0 or later is preinstalled. The GDAL C/C++ functions are invoked by using the
invalid reference
java.lang.foreign
package.

Prerequisites

The libgdal.so (on POSIX) or gdal.dll (on Windows) file must be reachable on the library search path. On POSIX systems, the libgdal.so is searched in the directories specified by the LD_LIBRARY_PATH environment variable. If the file is not found in these directories, then the search continues in /lib/ and /usr/lib/.

Accesses to native functions are restricted by default in Java and require user's authorization. This authorization can be granted by the following option on the command-line:

java --enable-native-access org.apache.sis.storage.gdal <other options>

When to use

GDAL supports a wider range of formats and compression methods than Apache SIS. Therefore, GDAL is a useful fallback when a format is not supported directly by SIS. However, GDAL is not necessarily faster or more capable than pure Java implementations. When a pure Java implementation exists, we recommend to test it before to fallback on native code. The performances of Apache SIS data stores are often comparable to GDAL, and the SIS modules dedicated to a format (GeoTIFF, netCDF, Earth Observation, …) have more extensive support than this module for some features such as ISO 19115 metadata and non-linear transforms.

Memory consumption

GDAL and Apache SIS both have their own cache mechanism. For reducing the amount of memory consumed by the same data cached twice, it may be useful to set the GDAL_CACHEMAX environment variable to a lower value. The value can be specified in megabytes or as a percentage (e.g. "5%").
Since:
1.5