GDAL/OGR + QGIS read-only support
Motivation
Read PMTiles, particularly vector archives, from the cloud or local storage using QGIS.
Currently MBTiles works by "drag and drop" into QGIS, and may work through adding a Vector Tile layer type. We want the same while also supporting vsicurl for accessing tiles via HTTP Ranges.
The priority should be on vector tiles, since raster tiles are well covered by existing formats. We only care about read support for now, because writing vector tilesets is best left to specialized tools like tippecanoe/planetiler.
pmtiles.hpp is the existing C++ implementation of pmtiles v3 utility functions that is copied into the tippecanoe source tree. This is intentionally written to be unopinionated about I/O and compression, as to re-use those already in GDAL.
Links
- GDAL frmts/mbtilesdataset.cpp
- See GDAL Wiki on Reading COG with GDAL
- Current PMTiles specification See #172 for some more details
Tagging @rouault (via @cholmes)
OGR PMTiles driver proposed per https://github.com/OSGeo/gdal/pull/7938
the GDAL PR addresses opening PMTiles to retrieve OGR features, however given the above requirements maybe what we want is a QGIS native driver analogous to qgsmbtiles.cpp for PMTiles. This would enable proper dynamic zoom and tile display in QGIS.
However, the QGIS native driver for MBTiles opens a SQLite database in-process, and can't benefit from the existing abstraction over /vsicurl/ etc that GDAL provides. The infrastructure for this already exists at qgsvectortileconnection.cpp