Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ansoncfit/otp2-scripts
Example scripts for batch queries to an OpenTripPlanner v2 server
https://github.com/ansoncfit/otp2-scripts
opentripplanner publictransportation transit traveltime
Last synced: 12 days ago
JSON representation
Example scripts for batch queries to an OpenTripPlanner v2 server
- Host: GitHub
- URL: https://github.com/ansoncfit/otp2-scripts
- Owner: ansoncfit
- License: mit
- Created: 2020-12-09T18:39:33.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-09T18:39:38.000Z (about 4 years ago)
- Last Synced: 2024-11-07T22:50:52.404Z (2 months ago)
- Topics: opentripplanner, publictransportation, transit, traveltime
- Language: Jupyter Notebook
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# otp2-scripts
Example scripts for batch queries to an OpenTripPlanner v2 serverThe `OTP2-batch.ipynb` notebook will write a CSV of walk/transit travel times for specified origin-destination pairs. Other tools (e.g. [R5](https://github.com/conveyal/r5)) may be much faster, especially for full O-D travel time matrices.
## Setup
Download OTP2 .jar (available [here](https://repo1.maven.org/maven2/org/opentripplanner/otp/)).
Modify `conf/build-config.json` so that the service dates correspond with the GTFS you will use.
Copy GTFS (.zip), OSM (.pbf), and `build-config.json` to a single directory (e.g. `graph`)
Start OTP2: `java -jar -Xmx6G otp-2.0.0.jar --build --save --serve graph`. If you've built a graph previously (i.e. `graph.obj` is present in the target directory): `java -jar -Xmx6G otp-2.0.0.jar --load graph`.
Modify `conf/routingRequest.json` so that it has desired parameters.
Save origin and destination .csv files, each with columns `GEOID, X, Y`, to the `conf` directory.
Open and run the `OTP2-batch.ipynb` notebook in jupyter lab.