A Simple Renderer for OpenStreetMap with Python

A Simple Renderer for OpenStreetMap with Python

A Simple Renderer for OpenStreetMap with Python. A simple renderer for OpenStreetMap with custom icons intended to display as many tags as possible

Röntgen (or Roentgen when ASCII is preferred) project consists of

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.

Usage

To get SVG map, just run

python roentgen.py -b <lon1>,<lat1>,<lon2>,<lat2>

(e.g. python roentgen.py -b 2.284,48.86,2.29,48.865). It will automatically download OSM data and write output map to map.svg. For more options see Map generation.

Map features

Building levels

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

3D buildings

Trees

Visualization of tree leaf types (broadleaved or needleleaved) and genus or taxon by means of icon shapes and leaf cycles (deciduous or evergreen) by means of color.

Trees

Viewpoint and camera direction

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

Surveillance

Power tower design

Visualize design values used with power=tower tag.

Power tower design

Power tower design

Emergency

Emergency

Japanese map symbols

There are special symbols appearing on Japanese maps.

Japanese map symbols

Icon set

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

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: python roentgen.py grid.

Icon combination

Some icons can be combined into new icons.

Bus stop icon combination

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).

Installation

pip install -r requirements.txt

Script running

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

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

Example:

python roentgen.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 python roentgen.py --help.

Download Details:

Author: enzet Download Link: Download The Source Code Official Website: https://github.com/enzet/Roentgen

maps python google-maps

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Lambda, Map, Filter functions in python

You can learn how to use Lambda,Map,Filter function in python with Advance code examples. Please read this article

top 30 Python Tips and Tricks for Beginners

In this post, we'll learn top 30 Python Tips and Tricks for Beginners

Google Maps Location Sharing Not Updating

In this blog post, I will discuss how to fix google maps location sharing not updating or not working and also will unable to refresh Google maps sharing location issues. By using Google location sharing features you can choose who can find your current location for what length of time. It is important to show the updated location that you can share with your family or friends so that they can receive you or show you the right path to access at your right location simply.

Google Maps Draggable Marker Get Coordinates

In this blog post, you will learn how to create google maps draggable marker using Google Maps Javascript API v3, and when you drag the marker position then get coordinates (latitude and longitude) of that location where you place the marker.

Get Google Trends using Python

Example of How you can get the Google Trends in Python. In this post, we will show how we can use Python to get data from Google Trends. Let’s have a look at the top trending searches for today in the US (14th of March, 2020).