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

Error using setup_r5() #389

Open
ismailsaadi opened this issue Jun 6, 2024 · 3 comments
Open

Error using setup_r5() #389

ismailsaadi opened this issue Jun 6, 2024 · 3 comments

Comments

@ismailsaadi
Copy link

Hi,

I downloaded the OSM network for the UK from Geofabrik (.pbf), all the UK bus/tram GTFS timetables (.zip), and the UK inter-city rail GTFS timetables (.zip). All files are in the same folder. No elevation map at this stage. I am using Java 21.0.3 and R 4.4.0. When I run:

r5r_core <- setup_r5(data_path)

the multimodal network (.dat) cannot be built. I get the following error:

Using cached R5 version from /Users/ismailsaadi/Library/Caches/org.R-project.R/R/r5r/r5_jar_v7.1.0/r5-v7.1-all.jar
2024-06-06 11:05:23,266 [main] ERROR c.c.r.s.StreetLayer - Continuing to load but ignoring generalized costs due to exception: java.lang.RuntimeException: All ways are expected to have generalized cost tags. Missing: slope_1:forward

Do you think that some data preprocessing is required?

@stupidpupil
Copy link
Contributor

Are you able to give a bit more detail on r5r's output and your data sources? (I'm not aware of a UK, or rather GB, GTFS dataset for rail for example.)

For context, I use r5r to do analysis on a bit of Britain:
https://github.com/stupidpupil/wales_ish_otp_graph/

(And have built a pretty shoddy R package to help handle some of the pre-processing.)

@ismailsaadi
Copy link
Author

ismailsaadi commented Jun 8, 2024

Yes. Apologies for the ambiguity. Rail timetable data are downloaded from ATOC as .cif files, which I then convert to GTFS using UK2GTFS. Bus timetables are downloaded from the DfT Bus Open Data Service. Regarding the error (with verbose=TRUE), while processing the GTFS files related to the bus data, it suddenly states:

[...]
2024-06-08 13:07:48,923 [main] DEBUG c.c.r.t.TripPattern - Pattern has route_id itm_all_gtfs:1733 and direction_id 0
2024-06-08 13:07:48,925 [main] DEBUG c.c.r.t.TripPattern - Pattern has route_id itm_all_gtfs:5790 and direction_id 0
2024-06-08 13:07:48,927 [main] DEBUG c.c.r.t.TripPattern - Pattern has route_id itm_all_gtfs:68280 and direction_id 0
2024-06-08 13:07:51,952 [main] DEBUG c.c.r.t.TripPattern - Pattern has route_id itm_all_gtfs:76136 and direction_id 0
2024-06-08 13:07:54,714 [main] DEBUG c.c.r.t.TripPattern - Pattern has route_id itm_all_gtfs:11284 and direction_id 0
2024-06-08 13:07:57,230 [main] DEBUG c.c.r.t.TripPattern - Pattern has route_id itm_all_gtfs:26731 and direction_id 0

Finished building network.dat at GTFS//network.dat
2024-06-08 13:08:18,421 [Finalizer] ERROR c.c.g.GTFSFeed - MapDB database was not closed before it was garbage collected. This is a bug!
juin 08, 2024 1:33:05 PM org.geotools.referencing.factory.DeferredAuthorityFactory disposeBackingStore
INFO: Disposing class org.geotools.referencing.factory.epsg.hsql.ThreadedHsqlEpsgFactory backing store
juin 08, 2024 1:33:06 PM org.hsqldb.persist.Logger logInfoEvent
INFO: Database closed

Note that I cannot find the network.dat file (although it's mentioned). I only see united-kingdom-latest.osm.pbf.mapdb and united-kingdom-latest.osm.pbf.mapdb.p.

@rafapereirabr
Copy link
Member

Could you please try building the network without thr GTFS files in the directory?

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

3 participants