Convert raster imagery (orthomosaic, NDVI, NDRE) to PMTiles
Project description
raster2pm 🛰️
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
NDRE with custom colormap
raster2pm ndre.tif --ndre --colormap RdYlGn -o ndre.pmtiles
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file raster2pm-0.1.4.tar.gz.
File metadata
- Download URL: raster2pm-0.1.4.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95f1df07ad2dd550191970330fdfc45cfd84961e06ebbbd225a38884dcade5ec
|
|
| MD5 |
76668117c695e93ae334aaa6ed501f41
|
|
| BLAKE2b-256 |
71abb1a7044826056b7f156323d4240d8badfe62e7cf034ba6dd58c9c08591aa
|
File details
Details for the file raster2pm-0.1.4-py3-none-any.whl.
File metadata
- Download URL: raster2pm-0.1.4-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9e3db5a2555a71e60db7a8cb2448a129556491030a7af97b789af8956354859
|
|
| MD5 |
371b27e261a26534dc222486398f4519
|
|
| BLAKE2b-256 |
480fcdd43a41b9c001294bd09182dfbad88f6b24889234f605298a68c28828bc
|