Package org.apache.sis.storage.gdal


package org.apache.sis.storage.gdal
Bridge to the GDAL library for reading rasters. This package 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. Running this package requires user's authorization to perform native accesses. See the module Javadoc for more information.

If the prerequisites described in the module Javadoc are met (GDAL presents in the library search path, native accesses enabled), then having this module on the module-path is sufficient for allowing Apache SIS to try GDAL when Data­Stores​.open(Object) is invoked. Pure Java implementations are tried first, and GDAL is tried as a fallback when no Java implementation can decode a file. When first needed, this module searches on the library path for a gdal​.dll file on Windows or a libgdal​.so file on Unix. If a different GDAL library is desired, it can be specified explicitly to the GDALStore­Provider constructor.

Limitations

The current implementation can only read vector data and two-dimensional rasters. It cannot yet write any data, and does not yet use the multi-dimensional raster API of GDAL. Those operations will be added progressively in future versions of this module.

For any GDAL layer, only one Stream returned by Feature­Set​.features(boolean) can be executed at a given time. This is because the GDAL OGRLayer­H C/C++ API provides only one cursor. If two iterations are executed in same time on the feature instances of the same Feature­Set, then a Concurrent­Read­Exception is thrown on the second iteration.

Since:
1.5