Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Incorrect file path for graph otp_build_graph() #110

Closed
CMKnott opened this issue Oct 22, 2023 · 1 comment
Closed

[BUG] Incorrect file path for graph otp_build_graph() #110

CMKnott opened this issue Oct 22, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@CMKnott
Copy link

CMKnott commented Oct 22, 2023

Describe the bug

I'm building an open trip planner (OTP) graph on Ubuntu using R.

I've specified my OTP folder with

path_data <- here::here("Input", "OTP")

And I get

[1] "/home/Projects/Transit Isochrone Map/Input/OTP"

But when I go to create the graph with this function

log1 <- opentripplanner::otp_build_graph(
  router = "Singapore",
  dir = path_data,
  otp = path_otp) 

I get this error

Warning: There are no osm.pbf files in /home/Projects/Transit Isochrone Map/Input/OTP//graphs//Singapore 
Error in opentripplanner::otp_build_graph(router = "Singapore", dir = path_data,  : 
Basic checks failed, please check your inputs

For some reason opentripplanner has added two forward slashes to the file path instead of one. Any idea why this has happened?

Expected behaviour
The graph should assemble based on the correct file

Screenshots
image

System
R version 4.3.1 (2023-06-16)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.3 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0

locale:
[1] LC_CTYPE=en_AU.UTF-8 LC_NUMERIC=C LC_TIME=en_AU.UTF-8 LC_COLLATE=en_AU.UTF-8
[5] LC_MONETARY=en_AU.UTF-8 LC_MESSAGES=en_AU.UTF-8 LC_PAPER=en_AU.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C

time zone: Asia/Singapore
tzcode source: system (glibc)

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] opentripplanner_0.5.2 lubridate_1.9.3 forcats_1.0.0 stringr_1.5.0
[5] dplyr_1.1.3 purrr_1.0.2 readr_2.1.4 tidyr_1.3.0
[9] tibble_3.2.1 ggplot2_3.4.2 tidyverse_2.0.0

loaded via a namespace (and not attached):
[1] gtable_0.3.3 xfun_0.39 raster_3.6-26 htmlwidgets_1.6.2 remotes_2.4.2
[6] lattice_0.21-9 tzdb_0.4.0 vctrs_0.6.4 tools_4.3.1 crosstalk_1.2.0
[11] generics_0.1.3 curl_5.1.0 parallel_4.3.1 proxy_0.4-27 fansi_1.0.5
[16] pacman_0.5.1 pkgconfig_2.0.3 KernSmooth_2.23-22 checkmate_2.2.0 RColorBrewer_1.1-3
[21] leaflet_2.2.0 lifecycle_1.0.3 compiler_4.3.1 munsell_0.5.0 terra_1.7-55
[26] codetools_0.2-19 leafsync_0.1.0 stars_0.6-1 htmltools_0.5.5 class_7.3-22
[31] pillar_1.9.0 classInt_0.4-10 lwgeom_0.2-13 abind_1.4-5 tidyselect_1.2.0
[36] digest_0.6.33 stringi_1.7.12 sf_1.0-14 rprojroot_2.0.3 fastmap_1.1.1
[41] grid_4.3.1 here_1.0.1 colorspace_2.1-0 cli_3.6.1 magrittr_2.0.3
[46] base64enc_0.1-3 dichromat_2.0-0.1 XML_3.99-0.14 utf8_1.2.3 leafem_0.2.3
[51] e1071_1.7-13 withr_2.5.1 backports_1.4.1 scales_1.2.1 sp_2.0-0
[56] timechange_0.2.0 png_0.1-8 hms_1.1.3 knitr_1.42 tmaptools_3.1-1
[61] tmap_3.3-4 viridisLite_0.4.2 rlang_1.1.1 Rcpp_1.0.11 glue_1.6.2
[66] DBI_1.1.3 rstudioapi_0.14 R6_2.5.1 units_0.8-4

Additional context
Graph building works for the training folder of the Isle of Wight, but working on my own graphs doesn't seem to work.

@CMKnott CMKnott added the bug Something isn't working label Oct 22, 2023
@mem48
Copy link
Contributor

mem48 commented Oct 25, 2023

The problem is the file name. It should be something.osm.pbf not just osm.pbf OTP checks for .osm.pbf files

@mem48 mem48 closed this as completed Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants