Skip to content

Commit

Permalink
Integrate oba tools into repo
Browse files Browse the repository at this point in the history
  • Loading branch information
optionsome committed Mar 21, 2024
1 parent ec03eb5 commit 9387df5
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,6 @@ Each data container image runs a http server listening to port 8080, serving bot
- finland: http://localhost:8080/router-finland.zip and graph-finland-<otpversion>.zip

### otp-data-tools
Contains tools for gtfs manipulation, such as One Bus Away gtfs filter.
These tools are packaged inside docker container and are used dunring the data build process.
Contains tools for gtfs manipulation, such as One Bus Away gtfs filter. OBA filter tool version 1.3.9 is embedded into this repository.
It should be replaced with a newer version if such one appears e.g. into https://mvnrepository.com/.

1 change: 1 addition & 0 deletions otp-data-tools/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM openjdk:8-jre-buster
MAINTAINER Digitransit version: 0.1
ADD onebusaway-gtfs-transformer-cli.jar /
ADD build-otp-data-tools.sh ${WORK}
VOLUME /data
RUN ./build-otp-data-tools.sh && rm build-otp-data-tools.sh
3 changes: 0 additions & 3 deletions otp-data-tools/build-otp-data-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ wget https://bootstrap.pypa.io/pip/2.7/get-pip.py && \
pip install cffi && \
pip install utm

mkdir -p one-busaway-gtfs-transformer && \
wget -O one-busaway-gtfs-transformer/onebusaway-gtfs-transformer-cli.jar "http://nexus.onebusaway.org/service/local/artifact/maven/content?r=public&g=org.onebusaway&a=onebusaway-gtfs-transformer-cli&v=1.3.9"

git clone https://github.com/jswhit/pyproj.git
cd pyproj
git checkout ec9151e8c6909f7fac72bb2eab927ff18fa4cf1d
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion task/OBAFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function OBAFilter (src, dst, rule) {
const p = new Promise((resolve) => {
let success = true
let lastLog = []
const cmd = `docker pull ${dataToolImage}; docker run -v ${hostDataDir}:/data --rm ${dataToolImage} java -Xmx6g -jar one-busaway-gtfs-transformer/onebusaway-gtfs-transformer-cli.jar --transform=/data/${rule} /data/${src} /data/${dst}`
const cmd = `docker pull ${dataToolImage}; docker run -v ${dataDir}:/data --rm ${dataToolImage} java -Xmx6g -jar onebusaway-gtfs-transformer-cli.jar --transform=/data/${rule} /data/${src} /data/${dst}`
const filterProcess = exec(cmd)

const checkError = (data) => {
Expand Down

0 comments on commit 9387df5

Please sign in to comment.