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.
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
# NDVI with auto-stretch
raster2pm ndvi.tif --ndvi --auto-stretch -o ndvi.pmtiles
# NDRE with custom colormap
raster2pm ndre.tif --ndre --colormap RdYlGn -o ndre.pmtiles
# High-quality WEBP output
raster2pm ortho.tif --format WEBP --quality 85 -o tiles.pmtiles
# Custom zoom levels
raster2pm ortho.tif --min-zoom 12 --max-zoom 18 -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
raster2pm-0.1.2.tar.gz
(18.4 kB
view details)
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
raster2pm-0.1.2-py3-none-any.whl
(17.0 kB
view details)
File details
Details for the file raster2pm-0.1.2.tar.gz.
File metadata
- Download URL: raster2pm-0.1.2.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b8b62a1b7c5f88742a19dfdb6ec813e373721912b59262f1ead09b8dc97374e
|
|
| MD5 |
ffe596a5373eba405fb4e13c6efad962
|
|
| BLAKE2b-256 |
f677bc19149ca515a2c33b3918b2a62557c0541b1029f3bf6f0fcdc012d314f3
|
File details
Details for the file raster2pm-0.1.2-py3-none-any.whl.
File metadata
- Download URL: raster2pm-0.1.2-py3-none-any.whl
- Upload date:
- Size: 17.0 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 |
9b0d1dc179133b5a28f06ccd9aeb95b6e0f06918b6104806721565bd64f62673
|
|
| MD5 |
51c456e5185acdfcdd647a1a8604a476
|
|
| BLAKE2b-256 |
5ef64f68d2971184b1989fd17d4b29a1a6596c1963c9d42a2ab1d0fcf2dcefb6
|