PMTiles icon indicating copy to clipboard operation
PMTiles copied to clipboard

GDAL/OGR + QGIS read-only support

Open bdon opened this issue 2 years ago • 11 comments

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

Tagging @rouault (via @cholmes)

bdon avatar May 19 '23 02:05 bdon

OGR PMTiles driver proposed per https://github.com/OSGeo/gdal/pull/7938

rouault avatar Jun 14 '23 19:06 rouault

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

bdon avatar Jun 19 '23 06:06 bdon