Backend for rideaway: a bicycle navigation application. Provides a routing endpoint where you can provide two coordinates to get the route between these points. Different routing profiles can be used to get different routing behavior and there is support for route instructions. Also provides an endpoint to request bicycle parkings in a certain radius around a location.
For all requests over the brussels cycle network timestamps, starting location and ending location are saved in the csv file corresponding with the date, which is available from hostname/requests/data
.
There is also a script included in src/scripts
to extract a geojson file of the routes in the Brussels network. This is adapted from https://github.com/oSoc17/rideaway-data. This file can then be accessed via hostname/routes/network.geojson
.
The backend uses the open source routing library Itinero by Ben Abelshausen.
The backend requires a routerdb file called belgium.routerdb
to be in src/mapdata
. There is a bash shell script in src/scripts
that downloads the latest osm.pbf
file of belgium from geofabrik and processes it with IDP to create the routerdb file.
To build the application, make sure you have the .NET Core library installed: https://www.microsoft.com/net/core.
Run build.sh
or build.bat
to build the application and run.sh
or run.bat
to run the application. The Api will start on http://localhost:5000.
Launch a GET
request to hostname/route
loc1
andloc2
: The starting and ending coordinates of the route (example:loc1=50.86071,4.35614
)profile
: choose a profile to do routing, possible values are:networks
: use the bicycle networks as much as possiblebalanced
: tries to select calmer streetsshortest
: the shortest route, but maybe not the most pleasant onebrussels
: use the brussels bicycle network as much as possible
instructions
: Boolean to specify if you want the API to return route instructions or not (instructions are only supported on thebrussels
profile)lang
: specify the language of the instructions (supported:en
andnl
)
Launch a GET
request to hostname/parking
loc
: location around which the parking need to be found (example:loc=50.86071,4.35614
)radius
: radius in meters