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

Cannot get network.dat to build #406

Open
bigdataforsocialjustice opened this issue Oct 19, 2024 · 5 comments
Open

Cannot get network.dat to build #406

bigdataforsocialjustice opened this issue Oct 19, 2024 · 5 comments

Comments

@bigdataforsocialjustice

When I updated to the latest package, I consistently encounter the following error. I know that it has been posted elsewhere. I followed those steps (e.g., ruling out a faulty PDF file, etc.) and have run this on different data. I would truly appreciate help with identifying the problem. The network.dat file is not built in the data_path. Thank you!!!

Error in .jcall("RJavaTools", "Z", "hasField", .jcast(x, "java/lang/Object"), :
java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "" is null

Situation report here

$r5r_package_version
[1] ‘2.0’

$r5_jar_version
[1] "7.1"

$java_version
[1] "21.0.4"

$set_memory
[1] "-Xmx5G"

$session_info
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22631)

@rafapereirabr
Copy link
Member

could you please share the link to your .pbf and GTFS data ?

@bigdataforsocialjustice
Copy link
Author

@rafapereirabr
Copy link
Member

Hi @bigdataforsocialjustice . I suspect your case is related to issue #407, which has been reported by other users. The problem seems to be that you are passing the OSM data of an area that is exceeds the limits of R5. The problem we have is that {r5r} should be capturing the error message, as it used to, but we're still invetigating how to fix this issue.

In the meantime, I suggest you follow these guidelines here to crop your OSM data to a smaller area.

@rafapereirabr
Copy link
Member

@bigdataforsocialjustice , can you please try running this reproducible example? Please let us know if this works in your computer.

library(r5r)

# build transport network
data_path <- system.file("extdata/poa", package = "r5r")
r5r_core <- setup_r5(data_path)

# load origin/destination points
points <- read.csv(file.path(data_path, "poa_points_of_interest.csv"))

departure_datetime <- as.POSIXct(
  "13-05-2019 14:00:00",
  format = "%d-%m-%Y %H:%M:%S"
)

ttm <- travel_time_matrix(
  r5r_core,
  origins = points,
  destinations = points,
  mode = c("WALK", "TRANSIT"),
  departure_datetime = departure_datetime,
  max_trip_duration = 60
)

head(ttm)

@bigdataforsocialjustice
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants