This project compiles map data from Open Street Map and filters family-friendly bike paths.
We consider any cycle track to be family-friendly when it's “separated from the road by curbs, parking lots, grass verges, trees or another physical barrier, but is running parallel to and next to the road“ [src].
This scope was chosen due to Germany's traffic regulations. 🇩🇪
In short:
- Kids aged 8 and under must ride on the sidewalk
- Kids between 8 and 10 may choose between sidewalk and street
- Kids aged 10 and old must ride on the street
- Kids of any age may ride on separated (protected) bike lanes.
- Parents may accompany their kids on the sidewalk.
As a consequence, the only sane solution for families with kids of mixed ages is to use separated (protected) bike lanes.
This repository only deals with map data. It will not yield anything nice to look at – that is, unless you like looking at big JSON files. 🤡
If you're looking for the website with the interactive map, check out the familienradwege-website repository.
This is the software you need installed on your machine:
- GNU Make
- Node.js 10.x (node-osmium provides binaries, it will fall back to source compile and might fail on other versions)
wget
andcurl
jq
, the command-line JSON processor
Once you have installed all required software, in the root directory of this project, run:
make all
This will do the following:
- Install project dependencies
- JS dependencies are installed via
npm
intonode_modules
- tools are compiled from source into
tools
- JS dependencies are installed via
- Download map data
- query the Overpass API in small batches
- download pieces of map data in OSM format
- combine the pieces into a large file
- Reduce data size
- filter the data by keeping only specific parts
- find ways that are too short, generate a diff of them and apply that diff (see osmChange)
- Convert data into geoJSON format
- done by osmtogeojson
- why geoJSON? Because it's portable (both OpenLayers and Leaflet.js support it)
We're lacking a way of automatically validating the output, e.g. using geojson-validation