Python renderer for OpenStreetMap with custom icons intended to display as many map features as possible
Find a file
2020-09-28 00:06:50 +03:00
data Add charging and fuel station icons. 2020-09-27 23:34:27 +03:00
doc Update icon grid image. 2020-09-27 23:38:09 +03:00
icons Add charging and fuel station icons. 2020-09-27 23:34:27 +03:00
roentgen Fix IDE warnings. 2020-09-27 21:39:22 +03:00
test Fix code style. 2020-09-24 23:55:04 +03:00
.gitattributes Remove PNG from .gitattributes. 2020-09-28 00:06:50 +03:00
.gitignore Getting data from OpenStreetMap. 2015-08-07 01:04:38 +03:00
.travis.yml Fix Travis CI config. 2020-09-25 23:19:03 +03:00
readme.md Update readme. 2020-09-25 23:57:19 +03:00
requirements.txt Use colour; add text structure. 2020-09-19 14:43:47 +03:00
run.py Fix #9, #21: fix relations; refactor flinger. 2020-09-18 23:48:33 +03:00
test_main.py Fix code style. 2020-09-24 23:55:04 +03:00

Röntgen is a

  • simple Python OpenStreetMap renderer,
  • set of icons,
  • and map styles.

Build Status

The idea behind Röntgen project is to have a possibility to display any map feature represented by OpenStreetMap data tags by means of colors, shapes, and icons.

Röntgen is primarily created for OpenStreetMap contributors. Suppose, you spent time adding colors for building walls, benches and shelters for bus stops but they are not represented on the standard tile layer. Röntgen helps to display all changes you made.

Nevertheless, Röntgen map generator can generate precise but messy maps for OSM contributors as well as pretty and clean maps for OSM users.

Map features

Building levels

Simple shapes for walls and shade in proportion to building:levels value.

3D buildings

Trees

Tree leaf types, leaf cycles, and genes.

Trees

Viewpoint and camera direction

Visualize direction tag for tourism=viewpoint and camera:direction for man_made=surveillance.

Surveillance

Icon set

If tag is drawable it is displayed using icon combination and colors. All icons are under CC BY 4.0 license. So, do whatever you want but give appropriate credit. Icon set is heavily inspired by Osmic icon set.

Icons

Feel free to request new icons via issues for whatever you want to see on the map. No matter how frequently the tag is used in OpenStreetMap since final goal is to cover all tags. However, common used tags have priority, other things being equal.

Draw icon grid: python3 run.py grid.

Icon combination

Some icons can be combined into new icons.

Bus stop icon combination

Röntgen map styles

All tags style

Options: --show-missing-tags --overlap 0.

Display as many OpenStreetMap data tags on the map as possible.

Pretty style

Options: --draw-captions main --level overground.

Display only not overlapping icons and main captions.

Creation time mode

Visualize element creation time with --mode time.

Creation time mode

Author mode

Every way and node displayed with the random color picked for each author with --mode user-coloring.

Author mode

Map generation

Requirements: Python (at least 3.8) and Python libraries (install everything using pip install -r requirements.txt).

There are simple Python renderer that generates SVG map from OpenStreetMap data. You can run it using:

python run.py \
    -b ${LONGITUDE_1},${LATITUDE_1},${LONGITUDE_2},${LATITUDE_2} \
    -o ${OUTPUT_FILE_NAME} \
    -s ${OSM_ZOOM_LEVEL}

Example:

python run.py -b 2.284,48.86,2.29,48.865

Main arguments

Required

  • --boundary-box or -b: boundary box to draw. Value: <longitude 1>,<latitude 1>,<longitude 2>,<latitude 2>. Use space before first - to escape negative values.

Optional

  • --scale or -s: OSM zoom level. Default is 18.
  • -o: path to output SVG file name. Default is map.svg.
  • -i: path to input XML file name. If this argument is not set, XML file will be downloaded through OpenStreetMap API.

Check all arguments with python3 run.py --help.