# 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 `DataStores​.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 `GDALStoreProvider` 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 `FeatureSet​.features(boolean)` can be executed at a given time. This is because the GDAL `OGRLayerH` C/C++ API provides only one cursor. If two iterations are executed in same time on the feature instances of the same `FeatureSet`, then a `ConcurrentReadException` is thrown on the second iteration.

Since:
  1.5

- Related Packages
  Module
  Package
  Description
  org.apache.sis.storage
  org.apache.sis.storage
  Data store base types for retrieving and saving geospatial data in various storage formats.
- Classes
  Class
  Description
  Driver
  Information about a GDAL driver.
  GDALStore
  A data store using the GDAL library for all data accesses.
  GDALStoreProvider
  The provider of `GDALStore` instances.