Skip to content

Commit

Permalink
Merge pull request #211 from leonardehrenfried/otp-upgrade
Browse files Browse the repository at this point in the history
Use newest NeTEx feed, upgrade OTP
  • Loading branch information
clezag authored Nov 20, 2024
2 parents b3f1f44 + 10630dd commit c49041e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .otp-version
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: NOI Techpark <digital@noi.bz.it>
#
# SPDX-License-Identifier: CC0-1.0
export OTP_IMAGE="opentripplanner/opentripplanner:2.6.0_2024-09-05T13-13"
export OTP_IMAGE="opentripplanner/opentripplanner:2.7.0_2024-11-19T11-28"
7 changes: 3 additions & 4 deletions build-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"transitModelTimeZone": "Europe/Rome",
"transitFeeds": [
{
// we rehost the NeTEx file because the original FTP server has issues
"source": "https://leonard.io/otp/alto-adige-netex-epip.xml.zip",
"source": "data/sta-netex.xml.zip",
"type": "netex",
"feedId": "sta",
"groupFilePattern": "(.*)\\.xml"
Expand All @@ -16,11 +15,11 @@
"type": "gtfs",
"feedId": "skyalps"
},
{
/*{
"source": "https://amarillo.otp.opendatahub.testingmachine.eu/gtfs/amarillo.altoadige.gtfs.zip",
"type": "gtfs",
"feedId": "amarillo"
},
},*/
{
"source": "data/parking-netex.xml.zip",
"type": "netex",
Expand Down
17 changes: 12 additions & 5 deletions build-graph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ NORTH_EAST_URL=https://download.geofabrik.de/europe/italy/nord-est-latest.osm.pb
NORTH_EAST_PBF=data/italy-nord-est.osm.pbf
SOUTH_TYROL_PBF=data/south-tyrol.osm.pbf
# elevation
ELEVATION_URL=https://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/TIFF/srtm_39_03.zip
# this URL is way too overloaded, so we mirror it
# ELEVATION_URL=https://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/TIFF/srtm_39_03.zip
ELEVATION_URL=https://leonard.io/srtm/srtm_39_03.zip
ELEVATION_ZIP=data/srtm_39_03.zip
# transit data
TRANSIT_NETEX_URL="ftp://ftp01.sta.bz.it/netex/$(date +%Y)/plan/EU_Profil/NX-PI_01_it_apb_LINE_apb__$(date +%Y%m%d).xml.zip"
TRANSIT_NETEX_ZIP=data/sta-netex.xml.zip
TRANSIT_NETEX_URL="https://rapuser:rappass@web01.sta.bz.it/netex/api/v4/downloadVersion?level=4&agencyCode=IT-ITH1"
TRANSIT_NETEX_XML=data/sta-netex.xml
TRANSIT_NETEX_GZ=${TRANSIT_NETEX_XML}.gz
TRANSIT_NETEX_ZIP=${TRANSIT_NETEX_XML}.zip
# parking
PARKING_NETEX_URL=https://transmodel.api.opendatahub.com/netex/parking
PARKING_NETEX_XML=data/shared-data.xml
Expand Down Expand Up @@ -47,8 +51,11 @@ if [ ! -f "${ELEVATION_ZIP}" ]; then
unzip -o ${ELEVATION_ZIP} -d data
fi

#echo "Downloading NeTEx transit data from ${TRANSIT_NETEX_URL}"
#${CURL} "${TRANSIT_NETEX_URL}" -o ${TRANSIT_NETEX_ZIP}
rm -f ${TRANSIT_NETEX_ZIP}
echo "Downloading NeTEx transit data from ${TRANSIT_NETEX_URL}"
${CURL} "${TRANSIT_NETEX_URL}" -o ${TRANSIT_NETEX_GZ}
gunzip --force ${TRANSIT_NETEX_GZ}
zip ${TRANSIT_NETEX_ZIP} ${TRANSIT_NETEX_XML}

# download parking data and put it into a zip
rm -f ${PARKING_NETEX_XML} ${PARKING_NETEX_ZIP}
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/docker/otp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Simon, do you know how we could use the value from .otp-version here?
FROM opentripplanner/opentripplanner:2.6.0_2024-09-05T13-13
FROM opentripplanner/opentripplanner:2.7.0_2024-11-19T11-28

WORKDIR /var/otp

Expand Down

0 comments on commit c49041e

Please sign in to comment.