This folder contains an example configuration file, as well as necessary files to run a demo of Transition. This demo corresponds to the territory of the Réseau de transport de Longueuil area.
-
Make sure all the pre-requisites are installed. For complete installation instructions of all dependencies, see the instructions for Ubuntu.
-
Update the .env file and set the
PROJECT_CONFIG
to point to the config file in this directory
PROJECT_CONFIG=</path/to/this/repo>/examples/transition/config.js
-
Follow the installation instructions at the root of this repo to setup the database and create users
-
Follow the build and start instructions at the root of this repo to compile and build the code, but do not start the nodejs server yet.
-
Get and prepare the road network for
osrm
to route. This step is optional, but required to create new lines that properly follow the road network. The first line will download the Open Street Map network data from the overpass API. The second line will prepare the data for theosrm
servers. Data is prepared differently for different modes of transportation. Selectingdriving
andwalking
are mandatory modes, asdriving
is the default mode for vehicles andwalking
is required to calculate access, transfer and egress times from transit.
yarn node --max-old-space-size=4096 packages/chaire-lib-backend/lib/scripts/osrm/downloadOsmNetworkData.task.js --polygon-file examples/polygon_rtl_area.geojson
yarn node --max-old-space-size=4096 packages/chaire-lib-backend/lib/scripts/osrm/prepareOsmNetworkData.task.js
-
Start the Node.js server with
yarn start:demo
. -
Navigate to
http://localhost:8080
and log into the application. -
Import transit data for the Réseau de Transport de Longueuil, that will work for the area of this demo. Lines and paths can be edited and added within this territory.
Copy or edit the config.js file and update for the area. The projectDirectory
(where the road network will be stored) and mapDefaultCenter
are the main fields to update. Be sure to point the PROJECT_CONFIG
environment variable to this new file.
Download and prepare the road network data for another area. Simply save a geojson polygon feature to a file, similar to the polygon_rtl_area.geojson file. To easily create a polygon, geojson.io can be used.