Class RangeReaderParams
This class converts between:
StorageParameter- Tileverse Storage SPI configuration parametersDataAccessFactory.Param- GeoTools DataStore factory parametersProperties- Configuration properties forStorageFactory
Purpose: The Tileverse Storage library uses an SPI mechanism with StorageProviders that declare
their configuration parameters. This class dynamically discovers all available providers and converts their
parameters to GeoTools DataStore parameters, enabling seamless configuration through GeoServer or other GeoTools
applications.
Supported Parameters:
- General: Provider selection, caching configuration
- AWS S3: Region, credentials, path style, credential profiles
- Azure Blob: Blob name, account key, SAS token
- Google Cloud Storage: Project ID, quota project, application credentials
Usage:
// In PMTilesDataStoreFactory
Map<String, Object> connectionParams = ...;
Properties storageConfig = RangeReaderParams.toProperties(connectionParams);
try (Storage storage = StorageFactory.open(parent, storageConfig);
RangeReader reader = storage.openRangeReader(key)) { ... }
- See Also:
-
StorageFactoryStorageProviderPMTilesDataStoreFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final List<DataAccessFactory.Param>Aggregated list of supportedstorage provider parametersconverted toDataAccessFactory.Paramstatic final DataAccessFactory.ParamParamDataStoreFactorycan use to force selecting a specificStorageProviderwithtoProperties(connectionParameters)and used to obtain the storage throughStorageFactory.open(Properties)orStorageConfig.fromProperties(Properties)static final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Paramstatic final DataAccessFactory.Param -
Method Summary
Modifier and TypeMethodDescriptionstatic DataAccessFactory.Param[]appendAfter(Predicate<DataAccessFactory.Param> filter, DataAccessFactory.Param... dataStoreParams) Appends storage configuration parameters after the specified datastore parameters.static DataAccessFactory.Param[]appendAfter(DataAccessFactory.Param... dataStoreParams) Appends all storage configuration parameters after the specified datastore parameters.static DataAccessFactory.ParamdataStoreParam(StorageParameter<?> param) Converts aStorageParameterto a GeoToolsDataAccessFactory.Param.static PropertiestoProperties(Map<String, ?> connectionParams) Converts DataStore connection parameters to storage configuration properties.static StorageConfigtoStorageConfig(URI uri, Map<String, ?> params) Builds aStorageConfigaddressingurias the leaf object, with backend-specific tuning taken from GeoTools connectionparams.
-
Field Details
-
RANGEREADER_PROVIDER_ID
ParamDataStoreFactorycan use to force selecting a specificStorageProviderwithtoProperties(connectionParameters)and used to obtain the storage throughStorageFactory.open(Properties)orStorageConfig.fromProperties(Properties) -
MEMORY_CACHE_ENABLED
-
HTTP_CONNECTION_TIMEOUT_MILLIS
-
HTTP_TRUST_ALL_SSL_CERTIFICATES
-
HTTP_AUTH_USERNAME
-
HTTP_AUTH_PASSWORD
-
HTTP_AUTH_BEARER_TOKEN
-
HTTP_AUTH_API_KEY_HEADERNAME
-
HTTP_AUTH_API_KEY
-
HTTP_AUTH_API_KEY_VALUE_PREFIX
-
AZURE_BLOB_NAME
-
AZURE_ANONYMOUS
-
AZURE_ACCOUNT_KEY
-
AZURE_SAS_TOKEN
-
AZURE_CONNECTION_STRING
-
AZURE_ENDPOINT
-
AZURE_MAX_RETRIES
-
AZURE_RETRY_DELAY
-
AZURE_MAX_RETRY_DELAY
-
AZURE_TRY_TIMEOUT
-
S3_FORCE_PATH_STYLE
-
S3_REQUESTER_PAYS
-
S3_ENDPOINT
-
S3_AWS_REGION
-
S3_ANONYMOUS
-
S3_AWS_ACCESS_KEY_ID
-
S3_AWS_SECRET_ACCESS_KEY
-
S3_USE_DEFAULT_CREDENTIALS_PROVIDER
-
S3_DEFAULT_CREDENTIALS_PROFILE
-
GCS_PROJECT_ID
-
GCS_QUOTA_PROJECT_ID
-
GCS_USER_PROJECT
-
GCS_USE_DEFAULT_APPLICTION_CREDENTIALS
-
GCS_ENDPOINT
-
PROVIDER_PARAMS
Aggregated list of supportedstorage provider parametersconverted toDataAccessFactory.Param
-
-
Method Details
-
appendAfter
Appends all storage configuration parameters after the specified datastore parameters.This method is used by
PMTilesDataStoreFactory.getParametersInfo()to dynamically include all storage configuration parameters based on available providers.- Parameters:
dataStoreParams- the base datastore parameters (e.g., URI, namespace)- Returns:
- array combining datastore parameters followed by all storage parameters
-
appendAfter
public static DataAccessFactory.Param[] appendAfter(Predicate<DataAccessFactory.Param> filter, DataAccessFactory.Param... dataStoreParams) Appends storage configuration parameters after the specified datastore parameters.This method is used by
PMTilesDataStoreFactory.getParametersInfo()to dynamically include all storage configuration parameters based on available providers.- Parameters:
filter- a filter predicate to apply in case some parameters need to be excludeddataStoreParams- the base datastore parameters (e.g., URI, namespace)- Returns:
- array combining datastore parameters followed by all storage parameters
-
dataStoreParam
Converts aStorageParameterto a GeoToolsDataAccessFactory.Param.This conversion handles:
- Key mapping from storage parameter keys
- Type conversion to GeoTools-compatible types
- Default values and sample values
- Parameter groups (basic vs advanced)
- Descriptions and titles for UI display
- Parameters:
param- the storage parameter to convert- Returns:
- the equivalent GeoTools Param
-
toProperties
Converts DataStore connection parameters to storage configuration properties.This method extracts all storage-related parameters from the DataStore connection parameters map and converts them to a
Propertiesobject suitable for passing toStorageFactory.open(java.net.URI, Properties).The conversion includes:
- Provider selection parameters
- Caching configuration
- Cloud provider authentication parameters (S3, Azure, GCS)
- Any other provider-specific parameters
Forward-compatible
storage.*keys (canonical in tileverse 2.x) are translated to the canonicalio.tileverse.rangereader.*form viaRangeReaderConfig#normalizeKeys(Map)before lookup, so DataStoreInfo entries persisted by a future tileverse 2.x consumer (e.g. GeoServer 3.1+) are read correctly here.- Parameters:
connectionParams- the DataStore connection parameters (fromPMTilesDataStoreFactory.createDataStore(java.util.Map<java.lang.String, ?>))- Returns:
- properties object suitable for
StorageFactory.open(java.net.URI, Properties)
-
toStorageConfig
Builds aStorageConfigaddressingurias the leaf object, with backend-specific tuning taken from GeoTools connectionparams. Pass the result toPMTilesReader.open(StorageConfig)orVersatilesReader.open(StorageConfig); the reader owns the resultingStorageandRangeReaderand closes both.
-