Skip to content

Commit

Permalink
Merge pull request #192 from leonardehrenfried/parking
Browse files Browse the repository at this point in the history
Add NeTEx static parking data
  • Loading branch information
dulvui authored Aug 1, 2024
2 parents e06e241 + 6f2a827 commit cc4df8a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 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 <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0
export OTP_IMAGE="opentripplanner/opentripplanner:2.6.0_2024-04-10T12-37"
export OTP_IMAGE="opentripplanner/opentripplanner:2.6.0_2024-08-01T06-53"
7 changes: 7 additions & 0 deletions build-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"embedRouterConfig": true,
"areaVisibility": true,
"staticParkAndRide": false,
"transitFeeds": [
{
"source": "https://gtfs.api.opendatahub.com/v1/dataset/sta-time-tables/raw",
Expand All @@ -16,6 +17,12 @@
"source": "https://amarillo.otp.opendatahub.testingmachine.eu/gtfs/amarillo.altoadige.gtfs.zip",
"type": "gtfs",
"feedId": "amarillo"
},
{
"source": "data/parking-netex.zip",
"type": "netex",
"feedId": "parking",
"ignoreParking": false
}
],
"osm": [
Expand Down
14 changes: 12 additions & 2 deletions build-graph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ 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
ELEVATION_ZIP=data/srtm_39_03.zip
# parking
PARKING_NETEX_URL=https://transmodel.api.opendatahub.com/netex/parking
PARKING_NETEX_XML=data/shared-data.xml
PARKING_NETEX_ZIP=data/parking-netex.zip

# when on github actions then install the required tools
if [ -n "${CI+isset}" ]; then
sudo apt-get -qq install osmium-tool pyosmium wget
sudo apt-get -qq install osmium-tool pyosmium wget zip
fi

mkdir -p data
Expand All @@ -39,10 +43,16 @@ if [ ! -f "${ELEVATION_ZIP}" ]; then
unzip -o ${ELEVATION_ZIP} -d data
fi

# download parking data and put it into a zip
rm -f ${PARKING_NETEX_XML} ${PARKING_NETEX_ZIP}
wget ${PARKING_NETEX_URL} -O ${PARKING_NETEX_XML}

zip --junk-paths ${PARKING_NETEX_ZIP} ${PARKING_NETEX_XML}


# actually do graph build
docker run \
-v .:/var/opentripplanner/:z \
--rm \
-e JAVA_TOOL_OPTIONS="-Xmx6G" \
${OTP_IMAGE} --build --save
"${OTP_IMAGE}" --abortOnUnknownConfig --build --save
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-04-10T12-37
FROM opentripplanner/opentripplanner:2.6.0_2024-08-01T06-53

WORKDIR /var/otp

Expand Down
6 changes: 0 additions & 6 deletions router-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@
"type": "stop-time-updater",
"url": "https://amarillo.otp.opendatahub.testingmachine.eu/gtfs/amarillo.altoadige.gtfsrt.pbf",
"feedId": "amarillo"
},
{
"type" : "vehicle-parking",
"feedId" : "noi",
"sourceType" : "noi-open-data-hub",
"url" : "https://parking.otp.opendatahub.com/parking/all.json"
}
]
}

0 comments on commit cc4df8a

Please sign in to comment.