Skip to content

FreemapSlovakia/rustmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RustMap

Reimplementation of https://github.com/FreemapSlovakia/freemap-mapnik into Rust, helping Mapnik to rest in peace.

Why?

  • Mapnik is no more actively developed except for keeping it to build itself with tools of the recent versions.
  • Better control of the rendering
  • Improve resource demands (CPU, memory)

Technical details

  • uses the same PostGIS schema as freemap-mapnik
  • uses Cairo for rendering
  • uses GDAL to read from GeoTIFFs

Uses refubrished freemap-mapserver with N-API bindings just because the rendering orchestration logic is fine and rewriting it to Rust can be done later.

Running

You must install Rust and if using mapserver then also Node.js. Mapserver us used for caching rendered tiles on the drive, pre-rendering, re-rendering in case of OSM data modification.

To run map rendering server without mapserver, configure .env, then cd to ./rust/crates/http and finally run cargo run.

TMS URL is then http://localhost:3050/{zoom}/{x}/{y}@2x[|.png|.svg] (adjust your scaling).

Land polygons

wget https://osmdata.openstreetmap.de/download/land-polygons-complete-3857.zip
unzip land-polygons-complete-3857.zip
ogr2ogr \
  -f PostgreSQL \
  PG:"host=localhost dbname=martin user=martin password=b0n0" \
  land-polygons-complete-3857 \
  -nln land_polygons_raw \
  -lco GEOMETRY_NAME=geom \
  -lco FID=osm_id \
  -lco SPATIAL_INDEX=GIST \
  -t_srs EPSG:3857 \
  -nlt PROMOTE_TO_MULTI \
  -overwrite

About

Outdoor map rendering solution at https://www.freemap.sk/#layers=X

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •