Skip to content

Commit

Permalink
First attempt at OTP2 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Jan 22, 2024
1 parent e134a66 commit 6fd7e46
Show file tree
Hide file tree
Showing 7 changed files with 157 additions and 54 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ journey/node_modules
journey/.env
journey/tmp
geocoder/.env

graph.obj
25 changes: 21 additions & 4 deletions build-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
{
"useTransfersTxt": false,
"embedRouterConfig": true,
"parentStopLinking": true,
"stopClusterMode": "parentStation"
"embedRouterConfig": true,
"areaVisibility": true,
"transitFeeds": [
{
"source": "https://gtfs.api.opendatahub.com/v1/dataset/sta-time-tables/raw",
"type": "gtfs",
"feedId": "sta"
},
{
"source": "https://gtfs.api.opendatahub.com/v1/dataset/skyalps-flight-data/raw",
"type": "gtfs",
"feedId": "skyalps"
}
],
"osm": [
{
"source": "data/south-tyrol.osm.pbf",
"timeZone": "Europe/Rome",
"osmTagMapping": "default"
}
]
}
21 changes: 21 additions & 0 deletions build-graph.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh

# SPDX-FileCopyrightText: NOI Techpark <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0

mkdir -p data

NORTH_EASTH_PBF=data/italy-nord-est.osm.pbf
SOUTH_TYROL_PBF=data/south-tyrol.osm.pbf

OTP_IMAGE=docker.io/opentripplanner/opentripplanner:2.5.0_2024-01-19T14-50

wget https://download.geofabrik.de/europe/italy/nord-est-latest.osm.pbf -O ${NORTH_EASTH_PBF} --no-clobber
osmium extract ${NORTH_EASTH_PBF} --polygon south-tyrol.geojson -o ${SOUTH_TYROL_PBF} --overwrite

podman run \
-v .:/var/opentripplanner/:z \
--rm \
-e JAVA_TOOL_OPTIONS="Xmx16G" \
${OTP_IMAGE} --build --save
Binary file removed otp-1.5.2-openmove.jar
Binary file not shown.
7 changes: 0 additions & 7 deletions otp-unofficial.sh

This file was deleted.

56 changes: 13 additions & 43 deletions router-config.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,15 @@
{
"updaters": [
{
"type": "stop-time-updater",
"sourceType": "gtfs-http",
"frequencySec": 60,
"feedId": "${GTFS_FEED_ID}",
"url": "${GTFS_RT_URL}"
},
{
"type": "bike-rental",
"frequencySec": 120,
"sourceType": "gbfs",
"network": "BZ",
"url": "${GBFS_HOST}/bz/${GBFS_VERSION}/"
},
{
"type": "bike-rental",
"frequencySec": 120,
"sourceType": "gbfs",
"network": "ME",
"url": "${GBFS_HOST}/me/${GBFS_VERSION}/"
},
{
"type": "bike-rental",
"frequencySec": 120,
"sourceType": "gbfs",
"network": "PAPIN",
"url": "${GBFS_HOST}/papin/${GBFS_VERSION}/"
},
{
"type": "car-rental-updater",
"sourceType": "car2go",
"frequencySec": 30,
"vehiclesUrl": "${CARSHARING_HOST}/carsharing/vehicles.json",
"regionsUrl": "${CARSHARING_HOST}/carsharing/regions.json"
},
{
"type": "car-park",
"sourceType": "park-and-ride",
"frequencySec": 60,
"url": "${PARKING_HOST}/parking/park-ride.json"
}
]
"transit": {
"dynamicSearchWindow": {
"minWindow": "4h",
"maxWindow": "16h"
}
},
"updaters": [
{
"type": "stop-time-updater",
"url": "https://mobility.api.opendatahub.testingmachine.eu/v2/GTFS-RT",
"feedId": "sta"
}
]
}
100 changes: 100 additions & 0 deletions south-tyrol.geojson
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"coordinates": [
[
[
10.596094752863905,
46.88761850922589
],
[
10.215075147765305,
46.79604829659155
],
[
9.926735987150636,
46.62658549503311
],
[
9.871814242271313,
46.252843252677394
],
[
10.323686680175655,
45.99649468969423
],
[
10.506675858631127,
45.75948870782801
],
[
10.926745068688348,
45.62536275534609
],
[
11.248044114250973,
45.6989096427684
],
[
11.692449003300908,
45.85746945760036
],
[
12.197257540618523,
45.994619692803894
],
[
12.583575395676604,
46.14830668791336
],
[
12.824759695748952,
46.54438638737474
],
[
12.644400789935446,
46.7129104660751
],
[
12.351095121931905,
46.922431853118866
],
[
12.243747099237027,
47.14271804055227
],
[
11.787210094930145,
47.117029331648155
],
[
11.272318736688703,
47.06795279562982
],
[
11.001142621347753,
46.960293764622435
],
[
11.018305666622382,
46.86180681535134
],
[
10.99771001229243,
46.81484465408542
],
[
10.596094752863905,
46.88761850922589
]
]
],
"type": "Polygon"
}
}
]
}

0 comments on commit 6fd7e46

Please sign in to comment.