A bike round trip planner for NRW using the api of openrouteservice.
Online version
This is a simple react-geo based round trip planner for biking tours.
While waypoints can be set individually or calculated with help of turf.js, the final directions are based on openrouteservice.
Optional For using a custom mapstyle that focuses on biking needs, additional steps and tools are needed (see below).
Clone repository to your local drive
npm i
npm start
- Download an OSM data extract from http://download.geofabrik.de, e.g. for Nordrhein-Westfahlen:
http://download.geofabrik.de/europe/germany/nordrhein-westfalen-latest.osm.pbf
- PostgreSQL: Create Database and activate PostGIS extension.
CREATE DATABASE bike_nrw;
CREATE EXTENSION POSTGIS;
- Import the OSM dataset into the database using Imposm See
/mapstyle
for config and mapping file
imposm3 import -config config.json -read nordrhein-westfalen-latest.osm.pbf -write -limitto nrw.geojson
- Geoserver: Install the following extensions:
- Importer
- Vector tiles
- mbstyle
- Import all database tables (see step 4) using Importer. Important: Activate application/x-protobuf;type=mapbox-vector (image format) in the Tile-Cache configuration.
- Create new style (Format: mystyle) and import the bikestyle.json file from
/mapstyle
- Create a new group layer (no need for adding the single layers) and apply the bike style
- Mapproxy: Config file:
/mapstyle/mapproxy.yaml
mapproxy-util serve-develop mapproxy.yaml -b localhost:8081
src/mapconfig.js
: Comment out line 59 and 60. Comment in line 61 to 62. That's it.
- Why NRW?
This project is among others a showcase for using newly published open geodata by the authorities in combination with existing open data and tools. Of course the app will work outside of NRW, too. But the shaded relief layer is limited to the state of NRW. - Can I use the app for planning hiking round trips?
Yes, just toogle the button with the bike icon. This will set the directions profile to hiking.
to do