Class GDALStoreProvider
Object
DataStoreProvider
GDALStoreProvider
The provider of
GDALStore instances.
Given a StorageConnector input, this class tries to instantiate a GDALStore.
This data store uses the GDAL native library for loading data.
Each GDALStoreProvider instance is linked to a GDAL library specified
at construction time, or to a JVM-wide shared GDAL library if the
no-argument constructor is used. In the non-shared case, GDAL will be unloaded
when this GDALStoreProvider instance is garbage collected.
- Since:
- 1.5
-
Nested Class Summary
Nested classes/interfaces inherited from class DataStoreProvider
DataStoreProvider.Prober<S> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OptionKey<String[]> Key for declaring GDAL drivers that may be used for opening the file.Fields inherited from class DataStoreProvider
CREATE, LOCATION -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new provider which will load the GDAL library from the default library path.GDALStoreProvider(Path library) Creates a new provider which will load the GDAL library from the specified file. -
Method Summary
Modifier and TypeMethodDescriptionReturns the GDAL version number together with the list of drivers.Returns an unmodifiable list of all GDAL drivers currently available.Returns the logger used by GDAL stores.Returns a description of all parameters accepted by this provider for opening a file with GDAL.Returns the release date of the GDAL library.Returns a generic name for this data store, used mostly in warnings or error messages.Returns the version number of the GDAL library.open(StorageConnector connector) Creates aGDALStoreinstance associated with this provider.open(ParameterValueGroup parameters) Creates aGDALStoreinstance from the given parameters.probeContent(StorageConnector connector) Returns the MIME type if the given storage appears to be supported by this data store.Methods inherited from class DataStoreProvider
getFormat, getSupportedVersions, probeContent
-
Field Details
-
DRIVERS_OPTION_KEY
Key for declaring GDAL drivers that may be used for opening the file. Drivers are identified by their short names. The drivers will be tested in the order they are specified.- See Also:
-
-
Constructor Details
-
GDALStoreProvider
public GDALStoreProvider()Creates a new provider which will load the GDAL library from the default library path. -
GDALStoreProvider
Creates a new provider which will load the GDAL library from the specified file. The library will be unloaded when this provider will be garbage-collected.- Parameters:
library- path to the library to load.- Throws:
IllegalArgumentException- if the GDAL library has not been found.NoSuchElementException- if a GDAL function has not been found in the library.IllegalCallerException- if this Apache SIS module is not authorized to call native methods.
-
-
Method Details
-
getShortName
Returns a generic name for this data store, used mostly in warnings or error messages.- Specified by:
getShortNamein classDataStoreProvider- Returns:
- a short name or abbreviation for the data store.
- See Also:
-
getVersion
-
getReleaseDate
-
getDrivers
-
configuration
Returns the GDAL version number together with the list of drivers. The GDAL version is in the root node, and drivers are listed as children. The table contains the following columns:-
for the value returned by
invalid reference
TableColumn#NAME.invalid reference
#getName() -
for the value returned by
invalid reference
TableColumn#IDENTIFIER.invalid reference
#getIdentifier()
- Returns:
- a table of available GDAL drivers.
- Throws:
DataStoreException- if an error occurred while querying GDAL metadata.
-
-
getOpenParameters
Returns a description of all parameters accepted by this provider for opening a file with GDAL.- Specified by:
getOpenParametersin classDataStoreProvider- Returns:
- description of available parameters for opening a file with GDAL.
- See Also:
-
probeContent
Returns the MIME type if the given storage appears to be supported by this data store. A supported status does not guarantee that reading or writing will succeed, only that there appears to be a reasonable chance according GDAL.- Specified by:
probeContentin classDataStoreProvider- Parameters:
connector- information about the storage (URL, stream, etc).- Returns:
- a supported status with the MIME type
if the given storage seems to be readable by
GDALStoreinstances. - Throws:
DataStoreException- if an I/O error occurred.
-
open
Creates aGDALStoreinstance associated with this provider.- Specified by:
openin classDataStoreProvider- Parameters:
connector- information about the storage (URL, stream, etc).- Returns:
- a data store implementation associated with this provider for the given storage.
- Throws:
DataStoreException- if an error occurred while creating the data store instance.- See Also:
-
open
Creates aGDALStoreinstance from the given parameters.- Overrides:
openin classDataStoreProvider- Parameters:
parameters- opening parameters as defined bygetOpenParameters().- Returns:
- a data store instance associated with this provider for the given parameters.
- Throws:
DataStoreException- if an error occurred while creating the data store instance.- See Also:
-
getLogger
Returns the logger used by GDAL stores.- Overrides:
getLoggerin classDataStoreProvider- Returns:
- the logger to use as a fallback (when there are no listeners) for warning messages.
- See Also:
-