The scripts in this repository can be used to download map data relevant for cyclists in Hamburg. This contains bicycle stands, rental stations, repair stations, air pump stations, velo routes, the current traffic density, construction sites, and accident spots.
For some datasets, additional processing is performed to obtain meaningful data. For example, the accident spots from the Unfallatlas dataset are clustered to find hotspots and warn users.
To provide this data as map overlays to users of the PrioBike app, it is packaged into a NGINX image which can be deployed as a stateless web service.
The easiest way to run a web service with the processed data is to use the contained Dockerfile
:
docker build -t priobike-map-data . && docker run -p 80:80 --rm priobike-map-data
This script executes all the following scripts in the correct order. All possible data is updated with this script.
This script downloads the latest OpenStreetMap data for the city of Hamburg (provided by Geofabrik). These are then filtered based on the values of the fclass
attribute and saved in a geojson
file. In these datasets, some features are stored as point data and others as polygons. The datasets contain different features.
- Bicycle stands (point data):
gis_osm_traffic_free_1.shp
→bicycle_parking.geojson
(fclass=parking_bicycle
) - Bicycle stands (polygon data):
gis_osm_traffic_a_free_1.shp
→bicycle_parking_polygon.geojson
(fclass=parking_bicycle
) - Bicycle rental stations (point data):
gis_osm_pois_free_1
→bicycle_rental
(fclass=bicycle_rental
) - Bicycle rental stations (polygon data):
gis_osm_pois_a_free_1
→bicycle_rental_polygon
(fclass=bicycle_rental
) - Bicycle shops/workshops (point data):
gis_osm_pois_free_1
→bicycle_shop
(fclass=bicycle_shop
) - Bicycle shops/workshops (polygon data):
gis_osm_pois_a_free_1
→bicycle_shop_polygon
(fclass=bicycle_shop
)
This script downloads data from various Web Feature Services (WFS) of the city of Hamburg and saves them in a geojson
file. The following WFS are used:
The dataset contains the location of bicycle parking facilities at rapid transit stations in the Hamburg metropolitan area. For each facility, the number of public parking spaces (covered and uncovered) and, if available, the number of lockable rental spaces are provided. More details here. License. Source.
The dataset contains real-time traffic conditions (updated every 5 minutes) on the Hamburg road network and major roads in the immediate vicinity of Hamburg, as well as on highways running through Hamburg south to Lüneburg, Hannover, and Bremen, and north to Itzehoe, Flensburg, and Lübeck.
Traffic conditions are classified into four states, from state class 1, free-flowing traffic (green) to state class 4, congested traffic (dark red). If no data is available for individual segments, no traffic condition is displayed. More details here. License. Source.
Construction sites on major roads and federal highways in Hamburg. More details here. License. Source.
The dataset contains the position of all StadtRAD stations in the Hamburg metropolitan area and the number of bicycles and cargo pedelecs currently available for rent. More details here. License. Source.
Static green waves in Hamburg. More details here. License. Source.
More details here. License. Source.
The dataset contains the network of the
Hamburg veloroutes. More details here. License. Source.
- All geodata generated by these scripts is stored in the
EPSG:4326
coordinate system. - The
main.py
script should be used to execute all scripts in the correct order to update all data. - Ensure the required Python libraries are installed to avoid any issues during execution.
- The generated
geojson
files contain valuable geographical information for the PrioBike app and are saved in theEPSG:4326
coordinate system.
We highly encourage you to open an issue or a pull request. You can also use our repository freely with the MIT
license.
Every service runs through testing before it is deployed in our release setup. Read more in our PrioBike deployment readme to understand how specific branches/tags are deployed.
Additional credit goes to our external contributors: SoWieMarkus
Help us improve this documentation. If you have any problems or unclarities, feel free to open an issue.