feat(bsag): adjust readme
This commit is contained in:
parent
12c713f819
commit
2241c03106
113
bsag/readme.md
113
bsag/readme.md
|
@ -2,11 +2,17 @@
|
|||
|
||||
* create user like [this](https://git.wtf-eg.de/dancesWithCycles/setup/src/branch/main/doc/gnu-linux-create-user.md)
|
||||
|
||||
* If required, install java like [this](https://git.wtf-eg.de/dancesWithCycles/setup/src/branch/main/doc/java.md)
|
||||
|
||||
* If required, install git like [this](https://git.wtf-eg.de/dancesWithCycles/setup/src/branch/main/doc/git.md)
|
||||
|
||||
* If required, install maven like [this](https://git.wtf-eg.de/dancesWithCycles/setup/src/branch/main/doc/maven.md)
|
||||
|
||||
# GTFS source file
|
||||
|
||||
* checkout [repo](https://github.com/OneBusAway/onebusaway-gtfs-modules.git)
|
||||
* checkout [repo](https://github.com/OneBusAway/onebusaway-gtfs-modules.git) (ATTENTION: alternative download link for [onebusaway-gtfs-transformer-cli](http://developer.onebusaway.org/modules/onebusaway-gtfs-modules/1.3.4-SNAPSHOT/onebusaway-gtfs-transformer-cli.html))
|
||||
```
|
||||
git@github.com:OneBusAway/onebusaway-gtfs-modules.git
|
||||
git clone https://github.com/OneBusAway/onebusaway-gtfs-modules.git
|
||||
```
|
||||
|
||||
* build tool
|
||||
|
@ -15,28 +21,30 @@ cd onebusaway-gtfs-modules
|
|||
mvn clean package
|
||||
```
|
||||
|
||||
ATTENTION: alternative download link for [onebusaway-gtfs-transformer-cli](http://developer.onebusaway.org/modules/onebusaway-gtfs-modules/1.3.4-SNAPSHOT/onebusaway-gtfs-transformer-cli.html)
|
||||
|
||||
* download GTFS data
|
||||
```
|
||||
wget -o ./wget-log-connect-ls-top-dhid.txt -O ./connect-ls-top-dhid.zip http://www.connect-info.net/opendata/gtfs/connect-nds-toplevel-dhid/<TOKEN>
|
||||
```
|
||||
|
||||
* generate GTFS extract
|
||||
* generate GTFS extract (ATTENTIONS: If server host has not enough main memory download the extract from development host and continue with OSM section.)
|
||||
|
||||
```
|
||||
cd
|
||||
mkdir <target folder>
|
||||
java -Xms20G -server -jar onebusaway-gtfs-transformer-cl-<version>.jar --transform=./connect-ls-top-dhid-retain-bsag.txt connect-ls-top-dhid.zip <target folder>
|
||||
```
|
||||
|
||||
* archive GTFS extract
|
||||
```
|
||||
zip -r connect-ls-top-dhid-retain-bsag.gtfs.zip bsag/
|
||||
(cd bsag/ && zip -r ../connect-ls-top-dhid-retain-bsag.gtfs.zip .)
|
||||
mv ../connect-ls-top-dhid-retain-bsag.gtfs.zip ./otp
|
||||
```
|
||||
|
||||
# OSM source file
|
||||
|
||||
* download osm extract for lower saxony
|
||||
```
|
||||
cd
|
||||
mkdir osm && cd osm
|
||||
rm wget-log-niedersachsen
|
||||
rm niedersachsen.osm.pbf
|
||||
|
@ -48,12 +56,97 @@ wget -o ./wget-log-niedersachsen -O niedersachsen-latest.osm.pbf http://download
|
|||
8.415555,52.893073,9.034566,53.269949
|
||||
```
|
||||
|
||||
* generate OSM extract for bsag
|
||||
* install osmconvert
|
||||
```
|
||||
sudo apt update
|
||||
sudo apt install osmctools --no-install-recommends
|
||||
```
|
||||
|
||||
* later
|
||||
* generate OSM extract for bsag
|
||||
```
|
||||
mkdir otp && cd otp
|
||||
mv ../connect-ls-top-dhid-retain-bsag.gtfs.zip .
|
||||
cd ~/osm
|
||||
osmconvert <input file name>.pbf -b=8.415555,52.893073,9.034566,53.269949 --complete-ways -o=<output file name>.pbf
|
||||
cd
|
||||
mkdir -p ~/otp
|
||||
mv ~/osm/<output file name>.pbf ~/otp/
|
||||
```
|
||||
|
||||
# Prepare otp
|
||||
|
||||
* build otp on development host and copy on server host or download otp
|
||||
|
||||
ATTENTION: Otp can be downloaded from here:
|
||||
https://github.com/opentripplanner/OpenTripPlanner/releases/
|
||||
https://repo1.maven.org/maven2/org/opentripplanner/otp/
|
||||
|
||||
```
|
||||
cd ~/otp
|
||||
mv ~/connect-ls-top-dhid-retain-bsag.gtfs.zip ~/otp/
|
||||
sudo update-alternatives --config java
|
||||
```
|
||||
|
||||
# Build street graph
|
||||
|
||||
* save the graph
|
||||
```
|
||||
cd ~/otp
|
||||
java -Xmx2G -jar otp-2.2.0-shaded.jar --buildStreet .
|
||||
```
|
||||
|
||||
# Build a graph layering transit data on top of the saved street graph
|
||||
```
|
||||
cd ~/otp
|
||||
java -Xmx2G -jar otp-2.2.0-shaded.jar --loadStreet --save .
|
||||
```
|
||||
|
||||
# Configure otp
|
||||
|
||||
* configure graph build in file build-config.json like this
|
||||
```
|
||||
{
|
||||
"graph":"file:///home/otp/otp-2.3.0/graph-${otp.serialization.version.id}.obj",
|
||||
"configVersion":"v0.0.1",
|
||||
"osmDefaults": {
|
||||
"osmTagMapping": "default",
|
||||
"timeZone": "Europe/Berlin"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
* configure routing in file router-config.json like this
|
||||
```
|
||||
{
|
||||
"updaters": [
|
||||
{
|
||||
"type" : "real-time-alerts",
|
||||
"frequencySec" : 60,
|
||||
"url" : "http://gtfsr.vbn.de/gtfsr_connect.bin",
|
||||
"feedId" : "VBN"
|
||||
},
|
||||
{
|
||||
"type" : "stop-time-updater",
|
||||
"frequencySec" : 60,
|
||||
"backwardsDelayPropagationType" : "REQUIRED_NO_DATA",
|
||||
"url" : "http://gtfsr.vbn.de/gtfsr_connect.bin",
|
||||
"feedId" : "VBN"
|
||||
}
|
||||
|
||||
],
|
||||
"configVersion":"v0.0.1"
|
||||
}
|
||||
```
|
||||
|
||||
* configure otp in general in file otp-config.json like this
|
||||
```
|
||||
{
|
||||
"otpFeatures" : {
|
||||
"SandboxAPILegacyGraphQLApi": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
# Start otp
|
||||
```
|
||||
cd ~/otp
|
||||
java -Xmx2G -jar otp-2.2.0-shaded.jar --load .
|
||||
```
|
Loading…
Reference in New Issue