diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a3f86e91..892cc79e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,6 @@ jobs: - name: Build graph run: | - sudo apt install osmium-tool wget ./build-graph.sh - name: Build docker file diff --git a/build-config.json b/build-config.json index 5aeea626..fec2840c 100644 --- a/build-config.json +++ b/build-config.json @@ -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": [ { diff --git a/build-graph.sh b/build-graph.sh index 09ece3ed..468b2946 100755 --- a/build-graph.sh +++ b/build-graph.sh @@ -1,19 +1,32 @@ -#!/bin/sh +#!/bin/bash -e # SPDX-FileCopyrightText: NOI Techpark # # 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 \ diff --git a/osm.url b/osm.url deleted file mode 100644 index e394007a..00000000 --- a/osm.url +++ /dev/null @@ -1,19 +0,0 @@ -https://overpass-api.de/api/map?bbox=9.880233649086051,46.30580331792924,10.397045932724035,46.66553146341906 -https://overpass-api.de/api/map?bbox=9.880233649086051,46.66553146341906,10.397045932724035,47.025259608908875 -https://overpass-api.de/api/map?bbox=10.397045932724035,45.94607517243942,10.91385821636202,46.30580331792924 -https://overpass-api.de/api/map?bbox=10.397045932724035,46.30580331792924,10.91385821636202,46.66553146341906 -https://overpass-api.de/api/map?bbox=10.397045932724035,46.66553146341906,10.91385821636202,47.025259608908875 -https://overpass-api.de/api/map?bbox=10.397045932724035,47.025259608908875,10.91385821636202,47.38498775439869 -https://overpass-api.de/api/map?bbox=10.91385821636202,45.94607517243942,11.430670500000003,46.30580331792924 -https://overpass-api.de/api/map?bbox=10.91385821636202,46.30580331792924,11.430670500000003,46.66553146341906 -https://overpass-api.de/api/map?bbox=10.91385821636202,46.66553146341906,11.430670500000003,47.025259608908875 -https://overpass-api.de/api/map?bbox=10.91385821636202,47.025259608908875,11.430670500000003,47.38498775439869 -https://overpass-api.de/api/map?bbox=11.430670500000003,45.94607517243942,11.947482783637987,46.30580331792924 -https://overpass-api.de/api/map?bbox=11.430670500000003,46.30580331792924,11.947482783637987,46.66553146341906 -https://overpass-api.de/api/map?bbox=11.430670500000003,46.66553146341906,11.947482783637987,47.025259608908875 -https://overpass-api.de/api/map?bbox=11.430670500000003,47.025259608908875,11.947482783637987,47.38498775439869 -https://overpass-api.de/api/map?bbox=11.947482783637987,46.30580331792924,12.464295067275971,46.66553146341906 -https://overpass-api.de/api/map?bbox=11.947482783637987,46.66553146341906,12.464295067275971,47.025259608908875 -https://overpass-api.de/api/map?bbox=11.947482783637987,47.025259608908875,12.464295067275971,47.38498775439869 -https://overpass-api.de/api/map?bbox=12.464295067275971,46.30580331792924,12.981107350913955,46.66553146341906 -https://overpass-api.de/api/map?bbox=12.464295067275971,46.66553146341906,12.981107350913955,47.025259608908875