Skip to main content

raster2pm 🛰️

PyPI version Python 3.8+ License: MIT

raster → PMTiles — Convert any GeoTIFF to web-optimized map tiles in one command.

Convert orthomosaics, NDVI, NDRE, and any raster imagery to PMTiles with automatic colormap application for vegetation indices.

NDVI with auto-stretch

raster2pm ndvi.tif --ndvi --auto-stretch -o ndvi.pmtiles

Dashboard Preview

NDVI Conversion

NDRE with custom colormap

raster2pm ndre.tif --ndre --colormap RdYlGn -o ndre.pmtiles

NDRE Conversion

Why raster2pm?

  • 🗺️ One command: raster2pm input.tif -o output.pmtiles
  • 🎨 Smart colormaps: Auto-detects NDVI/NDRE and applies beautiful color ramps
  • 📊 Built-in diagnostics: Statistics, histograms, and colour warnings
  • 🚀 Memory efficient: Handles massive rasters with block-by-block processing
  • 🌐 Web-ready: Output works with MapLibre, Leaflet, OpenLayers, and pmtiles.io

Installation

# Basic installation
pip install raster2pm

# With development dependencies
pip install raster2pm[dev]


## Complete Usage 

# RGB Orthomosaic
raster2pm ortho.tif -o tiles.pmtiles
# Custom zoom levels
raster2pm ortho.tif --min-zoom 12 --max-zoom 18 -o tiles.pmtiles
# High-quality WEBP output
raster2pm ortho.tif --format WEBP --quality 85 -o tiles.pmtiles
# JPEG with quality setting
raster2pm ortho.tif --format JPEG --quality 75 -o tiles_jpg.pmtiles


# Parallel processing (8 cores)
raster2pm large.tif --workers 8 -o tiles.pmtiles

# Custom metadata
raster2pm field.tif --name "Farm Field 42" --description "2cm/pixel, DJI P4" -o farm.pmtiles

# Check statistics before converting
raster2pm ndvi.tif --ndvi --stats-only

# Manual colormap range
raster2pm ndvi.tif --ndvi --min-value -0.3 --max-value 0.8 -o ndvi.pmtiles

# Disable overlay tiles
raster2pm ortho.tif --no-overlay -o tiles.pmtiles

# Include empty tiles
raster2pm ortho.tif --no-exclude-empty -o tiles.pmtiles

# Different colormaps
raster2pm ndvi.tif --ndvi --colormap viridis --auto-stretch -o ndvi.pmtiles
raster2pm ndvi.tif --ndvi --colormap plasma --auto-stretch -o ndvi.pmtiles
raster2pm ndvi.tif --ndvi --colormap ndvi_custom --auto-stretch -o ndvi.pmtiles

# Verbose output for debugging
raster2pm ortho.tif -v -o tiles.pmtiles

# Keep temporary files
raster2pm ndvi.tif --ndvi --keep-temp -o ndvi.pmtiles

Metadata

Release files for raster2pm 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for raster2pm 0.1.4
File Size Uploaded Provenance
raster2pm-0.1.4.tar.gz 18.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for raster2pm 0.1.4
File Interpreter ABI Platform
raster2pm-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 35.6 kB

Release files / raster2pm-0.1.4.tar.gz

Download URL raster2pm-0.1.4.tar.gz
Size 18.5 kB
Tags Source
SHA-256 checksum
How to use checksums
95f1df07ad2dd550191970330fdfc45cfd84961e06ebbbd225a38884dcade5ec
BLAKE2b-256 checksum
How to use checksums
71abb1a7044826056b7f156323d4240d8badfe62e7cf034ba6dd58c9c08591aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Release files / raster2pm-0.1.4-py3-none-any.whl

Download URL raster2pm-0.1.4-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9e3db5a2555a71e60db7a8cb2448a129556491030a7af97b789af8956354859
BLAKE2b-256 checksum
How to use checksums
480fcdd43a41b9c001294bd09182dfbad88f6b24889234f605298a68c28828bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Security for raster2pm 0.1.4

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page