gpio-pmtiles
⚠️ DEPRECATED: This plugin is deprecated. PMTiles support is now built into geoparquet-io core. Use
gpio pmtiles create(CLI) orgeoparquet_io.api.ops.create_pmtiles()(Python). See the GeoJSON guide for usage.
PMTiles generation plugin for geoparquet-io.
Overview
This plugin provides integrated PMTiles generation from GeoParquet files by orchestrating a streaming pipeline:
GeoParquet → [reproject] → [filter] → [convert to GeoJSON] → [tippecanoe] → PMTiles
All filtering, reprojection, and conversion happens in-memory through Unix pipes—no intermediate files needed.
Why use this plugin instead of manual piping?
- Simpler API: Single command handles the entire pipeline with sensible defaults
- Built-in CRS handling: Automatically reprojects to WGS84 if needed
- Better error messages: Clear guidance for common issues (tippecanoe missing, invalid paths)
- Quality defaults: Pre-configured tippecanoe settings for production use
Installation
# As a CLI tool
uv tool install geoparquet-io --with gpio-pmtiles
# For Python library use
pip install geoparquet-io gpio-pmtiles
Requirements:
- tippecanoe must be installed and available in PATH
- macOS:
brew install tippecanoe - Ubuntu:
sudo apt install tippecanoe
- macOS:
Quick Start
# Basic conversion
gpio pmtiles create buildings.parquet buildings.pmtiles
# With spatial filtering
gpio pmtiles create data.parquet filtered.pmtiles \
--bbox "-122.5,37.5,-122.0,38.0"
# With attribute filtering and column selection
gpio pmtiles create data.parquet cities.pmtiles \
--where "population > 10000" \
--include-cols name,population,area
# With CRS override (if metadata is incorrect)
gpio pmtiles create data.parquet tiles.pmtiles --src-crs EPSG:3857
# From S3 with AWS profile
gpio pmtiles create s3://bucket/data.parquet tiles.pmtiles --profile my-aws-profile
Python API
The plugin also provides a Python API:
from gpio_pmtiles import create_pmtiles_from_geoparquet
# Basic usage
create_pmtiles_from_geoparquet(
input_path="buildings.parquet",
output_path="buildings.pmtiles"
)
# With filtering
create_pmtiles_from_geoparquet(
input_path="data.parquet",
output_path="tiles.pmtiles",
bbox="-122.5,37.5,-122.0,38.0",
where="population > 10000",
include_cols="name,type,height",
min_zoom=0,
max_zoom=14
)
# With CRS override
create_pmtiles_from_geoparquet(
input_path="data.parquet",
output_path="tiles.pmtiles",
src_crs="EPSG:3857" # Reproject from EPSG:3857 to WGS84
)
CLI Options
| Option | Description |
|---|---|
--layer, -l |
Layer name in PMTiles (defaults to output filename) |
--min-zoom |
Minimum zoom level (use with --max-zoom or auto-detect) |
--max-zoom |
Maximum zoom level (auto-detected if not specified) |
--bbox |
Bounding box filter: minx,miny,maxx,maxy |
--where |
SQL WHERE clause for filtering rows |
--include-cols |
Comma-separated list of columns to include |
--precision |
Coordinate decimal precision (default: 6 for ~10cm accuracy) |
--src-crs |
Source CRS if metadata is incorrect (will reproject to WGS84) |
--attribution |
Attribution HTML for tiles (defaults to geoparquet-io link) |
--profile |
AWS profile name for S3 files |
--verbose, -v |
Show progress and commands being executed |
How It Works
Plugin System
This plugin uses the entry points system to register itself with geoparquet-io. When installed, it automatically adds the pmtiles command group to the gpio CLI.
Pipeline Architecture
The plugin orchestrates a subprocess pipeline:
- Reprojection (if
--src-crsspecified):gpio convert reproject - Filtering (if bbox/where/include-cols specified):
gpio extract - GeoJSON conversion:
gpio convert geojsonwith streaming output - Tile generation:
tippecanoewith production-quality settings
All stages communicate through Unix pipes for memory efficiency. No intermediate files are created.
Manual Pipeline Alternative
If you prefer manual control, you can achieve the same result with pipe commands:
# Plugin version (simple)
gpio pmtiles create data.parquet tiles.pmtiles --bbox "-122,37,-121,38"
# Equivalent manual pipeline
gpio extract data.parquet --bbox "-122,37,-121,38" | \
gpio convert geojson - | \
tippecanoe -P -o tiles.pmtiles -zg --simplify-only-low-zooms
The plugin provides better defaults and error handling, but manual piping offers more flexibility.
Coordinate Precision
The --precision option controls decimal places for coordinates:
| Precision | Accuracy | Use Case |
|---|---|---|
| 7 | ~1cm | High accuracy applications |
| 6 (default) | ~10cm | Most mapping use cases |
| 5 | ~1m | City-level visualization |
| 4 | ~10m | Regional maps |
# Reduce precision for smaller files
gpio pmtiles create data.parquet output.pmtiles --precision 5
Development
Contributions are welcome! See CLAUDE.md for development guidelines
# Clone and install
git clone https://github.com/geoparquet/gpio-pmtiles.git
cd gpio-pmtiles
uv sync --all-extras
# Run tests
uv run pytest
# Format and lint
uv run ruff format .
uv run ruff check --fix .
Related Documentation
- geoparquet-io Documentation - Full user guide and API reference
- GeoJSON Conversion Guide - Detailed streaming and conversion options
- tippecanoe documentation - Tile generation options
- PMTiles specification - PMTiles format details
Links
- PyPI: https://pypi.org/project/gpio-pmtiles/
- Issues: https://github.com/geoparquet/gpio-pmtiles/issues
- Parent Project: https://github.com/geoparquet/geoparquet-io
License
Apache 2.0
Metadata
Release files for gpio-pmtiles 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| gpio_pmtiles-0.2.0.tar.gz | 196.0 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gpio_pmtiles-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 209.4 kB
Release files / gpio_pmtiles-0.2.0.tar.gz
| Download URL | gpio_pmtiles-0.2.0.tar.gz |
|---|---|
| Size | 196.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce51abb350eb484325c1e30dc60cd82f20d8190f0ff3b641d5ff800af1d1c46c
|
|
BLAKE2b-256 checksum How to use checksums |
cb7d35f870fa181a96bf4395bd54196b5118483e11daf25737754cf736213dfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 29, 2026.
Transparency logRelease files / gpio_pmtiles-0.2.0-py3-none-any.whl
| Download URL | gpio_pmtiles-0.2.0-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a1d7e3d9e7faed24c11128e0fd2470ac9e7e478428a5480ec8a6dc66c22257d
|
|
BLAKE2b-256 checksum How to use checksums |
fbe91d8173559da8f35957bb6e5d208ef2584674f1c467558a2234d052a31630
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 29, 2026.
Transparency logSecurity for gpio-pmtiles 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for gpio_pmtiles-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.