geojson-tile-renderer
A high-performance Rust library for converting GeoJSON features to PNG tile images with Web Mercator projection (EPSG:3857).
This is a Rust port of the geojson-to-tile-images TypeScript library, providing ~50x faster performance for batch tile rendering.
Features
- ✅ Render Polygon, LineString, Point, and Multi* geometries
- ✅ Web Mercator projection (EPSG:3857)
- ✅ Configurable tile sizes and styling
- ✅ Parallel tile rendering with Rayon
- ✅ Complete feature parity with TypeScript version
Performance
- ~50x faster for batch rendering (100 tiles)
- Single tile: <1ms vs 3ms (TypeScript)
- 100 tiles: 4ms vs 193ms (TypeScript)
- Memory: ~10-20MB vs 130MB+ (Node.js)
Usage
Add this to your Cargo.toml:
[]
= "0.1.0"
Basic Example
use ;
Batch Rendering (Parallel)
// Render multiple tiles in parallel
let tiles = vec!;
let results = renderer.render_many?;
for in tiles.iter.zip
Styling Options
use ;
let settings = builder
.size
.background_color
.fill_color
.stroke_color
.stroke_width
.build?;
CLI Tool
For command-line usage, install the CLI tool separately:
License
MIT - See LICENSE file for details
Credits
Rust port based on the original geojson-to-tile-images by Charlie Fish.