Creating PMTiles from Overture Maps with gpq and tippecanoe
Overture Maps, which is currently largely based on OpenStreetMap data, is an interesting new open geo data source for different applications. This post shows how to download data from Overture Maps and convert it to a PMTiles container for use in serverless map applications and other use cases.
Download Overture Maps transportation data
To download data from Overture Maps, its Python command-line tool is quite handy.
The following two invocations of the tool download the segment and connector features of the transportation layer and store them in two GeoParquet files.
To limit the data downloaded, specify an area's bounding box using the --bbox
option.
overturemaps download --bbox=8.715,50.092,8.719,50.094 -f geoparquet --type=segment -o segment.parquet
overturemaps download --bbox=8.715,50.092,8.719,50.094 -f geoparquet --type=connector -o connector.parquet
Convert GeoParquet files to GeoJSON
As the following step needs the transportation features as GeoJSON files, convert the GeoParquet files using the gpq command-line tool:
gpq convert segment.parquet segment.geojson
gpq convert connector.parquet connector.geojson
Create Mapbox / PMTiles vector tiles
With tippecanoe, the features in the
GeoJSON files are now converted to Mapbox vector tiles inside a PMTiles
container and joined using tippecanoe's tile-join
command.
tippecanoe connector.geojson -o connector.pmtiles
tippecanoe segment.geojson -o segment.pmtiles
tile-join transportation.pmtiles segment.pmtiles connector.pmtiles
The PMTiles container can now be used in other applications, for example using MapLibre GL JS.