Skip to content
OpenStreetMap raster tile renderer written in Rust
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benches
browser_test
mapcss
samples
src
tests
.clippy.toml
.gitignore
.hgignore
.rustfmt.toml
Cargo.lock
Cargo.toml
README.md
todo.txt

README.md

An OpenStreetMap raster tile renderer that compiles to a native Windows/Linux/macOS binary with no external dependencies.

You do have to install Rust to compile the binary, but other than that, all you need is an *.xml file with raw OSM data.

Importing data

This command takes a city.xml data file (get one from Geofabrik or a simliar service) and outputs city.bin, which will be used for rendering.

$ cargo run --release --bin importer city.xml city.bin

Rendering data

$ cat city.conf
[http]
address = localhost:8080

[geodata]
file = city.bin

[style]
file = mapcss/osmosnimki-minimal.mapcss
type = josm

$ cargo run --release --bin renderer city.conf

Raster tiles are now being served from http://localhost:8080/{z}/{x}/{y}.png. This URL template should work out of the box with leaflet.js, MKTileOverlay, or any map library that supports slippy tile layers.

You can use the @2x suffix to request high-resolution tiles (i.e. change your URL template to http://localhost:8080/{z}/{x}/{y}{r}.png for leaflet.js).

Rendering sample

The rendering style is based on MAPS.ME.

London centre

You can’t perform that action at this time.