Package org.geotools.pmtiles.store
Class PMTilesDataStore
Object
ContentDataStore
VectorTilesDataStore
PMTilesDataStore
- All Implemented Interfaces:
DataAccess<SimpleFeatureType,,SimpleFeature> DataStore
GeoTools DataStore implementation for reading PMTiles archives containing Mapbox Vector Tiles.
This datastore provides access to cloud-optimized PMTiles archives from various sources including local files, HTTP/HTTPS servers, and cloud storage (AWS S3, Azure Blob Storage, Google Cloud Storage). It uses the Tileverse Range Reader library for efficient byte-range access and the Tileverse PMTiles library for reading the PMTiles format.
Features:
- Reads PMTiles v3 archives with embedded vector tiles
- Supports multiple data sources via
RangeReader - Automatic zoom level selection based on query resolution
- Spatial filtering and bbox optimization
- Coordinate reference system transformation
- Thread-safe concurrent access
-
Field Summary
Fields inherited from class VectorTilesDataStore
DEFAULT_GEOMETRY_FACTORYFields inherited from class ContentDataStore
dataStoreFactory, entries, featureFactory, filterFactory, geometryFactory, JOINED_FEATURE_TYPE, lockingManager, LOGGER, namespaceURI, typeFactory, WRITER_ADD, WRITER_COMMIT, WRITER_UPDATE -
Constructor Summary
ConstructorsConstructorDescriptionPMTilesDataStore(PMTilesDataStoreFactory factory, PMTilesReader pmtilesReader) Creates a new PMTiles datastore from aPMTilesReader. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Disposes of this datastore and releases all resources, including closing the underlyingPMTilesReader.Methods inherited from class VectorTilesDataStore
createFeatureSource, createTypeNames, getTileStoreMethods inherited from class ContentDataStore
createContentState, createSchema, ensureEntry, ensureFeatureStore, entry, getDataStoreFactory, getEntry, getFeatureFactory, getFeatureReader, getFeatureSource, getFeatureSource, getFeatureSource, getFeatureSource, getFeatureTypeFactory, getFeatureWriter, getFeatureWriter, getFeatureWriterAppend, getFilterFactory, getGeometryFactory, getInfo, getLockingManager, getLogger, getNames, getNamespaceURI, getSchema, getSchema, getTypeNames, name, removeEntry, removeSchema, removeSchema, setDataStoreFactory, setFeatureFactory, setFeatureTypeFactory, setFilterFactory, setGeometryFactory, setNamespaceURI, updateSchema, updateSchema
-
Constructor Details
-
PMTilesDataStore
public PMTilesDataStore(PMTilesDataStoreFactory factory, PMTilesReader pmtilesReader) throws IOException Creates a new PMTiles datastore from aPMTilesReader.The PMTilesReader provides access to the PMTiles archive and manages the underlying byte-range reader and caches. The datastore takes ownership of the reader and will close it when
dispose()is called.- Parameters:
factory- the factory that created this datastore, used for accessing shared resourcespmtilesReader- the PMTilesReader providing access to the PMTiles archive- Throws:
IOException- if the PMTiles archive cannot be read or is invalid
-
-
Method Details
-
dispose
public void dispose()Disposes of this datastore and releases all resources, including closing the underlyingPMTilesReader.After calling this method, the datastore should not be used anymore.
- Specified by:
disposein interfaceDataAccess<SimpleFeatureType,SimpleFeature> - Overrides:
disposein classContentDataStore
-