lua-based OpenStreetMap renderer. WIP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
share initial hacky code Dec 29, 2015


experimental OpenStreetMap renderer. Despite its name it is used for rendering of earth surface mostly.

Work in progress. See introduction post.


  • input format: OSM XML, Overpass API JSON output
  • output format: SVG
  • rendering rules scriptable with lua
  • no need for installing Postgres


Download source package and unzip it. Binaries for windows are already included.

For installation under linux see this issue.

Some rendering rules uses Symbola font, it's better to install it otherwise you got mojibake.


  1. go to OpenStreetMap, select some nice place and export it
  2. drop exported XML file to LunaRender working directory
  3. run cmdhere.bat (or add lunarender.bat to PATH)
  4. call lunarender map.osm from command line

using data from Overpass API

  1. go to Overpass turbo and enter your query. Note: you have to include [out:json] and [bbox:{{bbox}}] in your query.
  2. export data as raw data
  3. drop exported JSON file to LunaRender working directory
  4. run cmdhere.bat (or add lunarender.bat to PATH)
  5. call lunarender export.json from command line

command line parameters

  1. input file name - required
  2. rendering rules file name - default rules/default.lua
  3. zoom - default 15

rendering rules

Rendering rules are written in lua.

Currently there is no documentation about rendering rules. You have to look into source code of demo rules.


  • Joe Schwartz for this article. I got projection code from there.
  • Igor Brejc for Maperitive. This is great inspiration for me.
  • Matthew Wild for LuaExpat
  • David Kolf for dkjson
  • Paul Kulchenko for Serpent
  • LuaDist authors
  • lua authors for great language
  • and finally all OpenStreetMap contributors for test data

pics or didnt happen

default style

default style

technology demo

technology demo

Soviet map style

Soviet map style