Skip to content

Commit

Permalink
Merge pull request #177 from leonardehrenfried/otp2
Browse files Browse the repository at this point in the history
Activate SkyAlps, fix graph build
  • Loading branch information
dulvui authored Jan 31, 2024
2 parents df521c4 + 7f4963d commit df65ce3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 31 deletions.
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:

- name: Build graph
run: |
sudo apt install osmium-tool wget
./build-graph.sh
- name: Build docker file
Expand Down
8 changes: 3 additions & 5 deletions build-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
"source": "https://gtfs.api.opendatahub.com/v1/dataset/sta-time-tables/raw",
"type": "gtfs",
"feedId": "sta"
}
/*
this feed is not GTFS-compliant yet: https://github.com/noi-techpark/odh-mentor-otp/issues/168#issuecomment-1904328702
,{
},
{
"source": "https://gtfs.api.opendatahub.com/v1/dataset/skyalps-flight-data/raw",
"type": "gtfs",
"feedId": "skyalps"
}*/
}
],
"osm": [
{
Expand Down
25 changes: 19 additions & 6 deletions build-graph.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
#!/bin/sh
#!/bin/bash -e

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

mkdir -p data

NORTH_EASTH_PBF=data/italy-nord-est.osm.pbf
# OSM
NORTH_EAST_URL=https://download.geofabrik.de/europe/italy/nord-est-latest.osm.pbf
NORTH_EAST_PBF=data/italy-nord-est.osm.pbf
SOUTH_TYROL_PBF=data/south-tyrol.osm.pbf

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

wget -q --show-progress --no-clobber https://download.geofabrik.de/europe/italy/nord-est-latest.osm.pbf -O ${NORTH_EASTH_PBF}
osmium extract ${NORTH_EASTH_PBF} --polygon south-tyrol.geojson -o ${SOUTH_TYROL_PBF} --overwrite
# when on github actions then install the required tools
if [ -n "${CI+isset}" ]; then
sudo apt-get -qq install osmium-tool wget
fi

mkdir -p data

if [ ! -f "${NORTH_EAST_PBF}" ]; then
wget --progress=bar:force:noscroll ${NORTH_EAST_URL} -O ${NORTH_EAST_PBF}
fi

# cut out South Tyrol from the large North East Italy extract
osmium extract ${NORTH_EAST_PBF} --polygon south-tyrol.geojson -o ${SOUTH_TYROL_PBF} --overwrite

# actually do graph build
docker run \
-v .:/var/opentripplanner/:z \
--rm \
Expand Down
19 changes: 0 additions & 19 deletions osm.url

This file was deleted.

0 comments on commit df65ce3

Please sign in to comment.