Class RangeReaderParams

Object
RangeReaderParams

public class RangeReaderParams extends Object
Bridges Tileverse Range Reader configuration to GeoTools DataStore parameters.

This class converts between:

  • RangeReaderParameter - Tileverse Range Reader SPI configuration parameters
  • DataAccessFactory.Param - GeoTools DataStore factory parameters
  • Properties - Configuration properties for RangeReaderFactory

Purpose: The Tileverse Range Reader library uses an SPI mechanism with RangeReaderProviders 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 rangeReaderConfig = RangeReaderParams.toProperties(connectionParams);
 RangeReader reader = RangeReaderFactory.create(uri, rangeReaderConfig);
 
See Also:
  • Field Details

  • Method Details

    • appendAfter

      public static DataAccessFactory.Param[] appendAfter(DataAccessFactory.Param... dataStoreParams)
      Appends Range Reader configuration parameters after the specified datastore parameters.

      This method is used by PMTilesDataStoreFactory.getParametersInfo() to dynamically include all Range Reader configuration parameters based on available providers.

      Parameters:
      dataStoreParams - the base datastore parameters (e.g., URI, namespace)
      Returns:
      array combining datastore parameters followed by all Range Reader parameters
    • dataStoreParam

      public static DataAccessFactory.Param dataStoreParam(RangeReaderParameter<?> param)
      Converts a RangeReaderParameter to a GeoTools DataAccessFactory.Param.

      This conversion handles:

      • Key mapping from Range Reader 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 Range Reader parameter to convert
      Returns:
      the equivalent GeoTools Param
    • toProperties

      public static Properties toProperties(Map<String,?> connectionParams)
      Converts DataStore connection parameters to Range Reader configuration properties.

      This method extracts all Range Reader-related parameters from the DataStore connection parameters map and converts them to a Properties object suitable for passing to RangeReaderFactory.create(java.net.URI).

      The conversion includes:

      • Provider selection parameters
      • Caching configuration
      • Cloud provider authentication parameters (S3, Azure, GCS)
      • Any other provider-specific parameters
      Parameters:
      connectionParams - the DataStore connection parameters (from PMTilesDataStoreFactory.createDataStore(java.util.Map<java.lang.String, ?>))
      Returns:
      properties object suitable for RangeReaderFactory.create(java.net.URI)