ipeaGIT / r5r

https://ipeagit.github.io/r5r/
Other
178 stars 27 forks source link

reading GTFS data #203

Closed majki00 closed 2 years ago

majki00 commented 2 years ago

Hi, I am working on creating accessibility index for Warsaw. I have successfully dowloaded the package and it works with the data provided in your example. However, when I am using GTFS data for Warsaw (https://transitfeeds.com/p/ztm-warszawa/720/20200204) travel_time_matrix returns only WALK time as if GTFS data was not read properly (the time is identical no matter whether mode is WALK or WALK and TRANSIT). I wonder whether there is anything missing in the provided GTFS data. The data is saved as warsaw.gtfs.zip. I would be grateful for your response.

Network data: http://download.geofabrik.de/europe/poland/mazowieckie.html POIS: http://slipo.eu/?p=1551

Code:

#path to dir with all the files
path<-("/Users/michal/Desktop/rstudio_diss/data_acc")
list.files(path)
#sample of points
cin.p <- cinema[ c(sample(1:nrow(cinema), 10, replace=TRUE)), ]
hos.p<-hospital[ c(sample(1:nrow(hospital), 10, replace=TRUE)), ]

r5r_core <- setup_r5(data_path = path, verbose = FALSE)
mode<-c("WALK", "TRANSIT")
max_walk_dist<-3000
max_trip_duration<-60
departure_datetime<-as.POSIXct("04-02-2020 07:30:00", format="%d-%m-%Y %H:%M:%S")
h <- travel_time_matrix(r5r_core = r5r_core,
                          origins = cin.p,
                          destinations = hos.p,
                          mode = mode,
                          departure_datetime = departure_datetime,
                          max_walk_dist = max_walk_dist,
                          max_trip_duration = max_trip_duration,
                          verbose = FALSE)
head(h)

dit<-detailed_itineraries(r5r_core = r5r_core,
                          origins = cin.p,
                          destinations = hos.p,
                          mode = mode,
                          departure_datetime = departure_datetime,
                          max_walk_dist = max_walk_dist,
                          max_trip_duration = max_trip_duration,
                          verbose = FALSE)
mvpsaraiva commented 2 years ago

Hi @majki00. The problem you mentioned usually happens when the date informed in departure_datetime is outside the GTFS range, but that doesn't seem to be the case here.

I've tested your code and got results that seem to be ok.

Results with WALK and TRANSIT:

fromId toId travel_time
node/7061367621 node/6627386045 56
way/243923693 way/29024766 30
way/243923693 node/6627386045 34
way/243923693 node/6685009464 31
node/678963604 way/29024766 28
node/678963604 node/1724515583 48
node/678963604 node/6627386045 41
node/678963604 node/6685009464 40
node/3740488836 way/29024766 30
node/3740488836 node/6627386045 55
node/5965555600 way/29024766 56
node/5965555600 node/6627386045 53
node/5965555600 node/6685009464 51
node/6835804279 way/29024766 29
node/6835804279 node/6685009464 47
node/5106026256 way/29024766 49
node/5106026256 node/6627386045 43
node/5106026256 node/6685009464 44

Results with WALK only:

fromId toId travel_time
way/243923693 node/6685009464 46
node/678963604 way/29024766 53

Maybe the problem is in the code that's missing from your example, like the part you load and treat the POIs.

mvpsaraiva commented 2 years ago

Just for reference, this is the full code I've used. I've saved all files you provided links in the data folder inside an RStudio project

# allocate RAM memory to Java
options(java.parameters = "-Xmx16G")

library(r5r)
library(data.table)

#path to dir with all the files
path<-("data")
list.files(path)

poi <- fread("data/mazowieckie-pois.osm.csv")
cinema <- poi[SUBCATEGORY == "CINEMA"]
hospital <- poi[SUBCATEGORY == "HOSPITAL"]

#sample of points
cin.p <- cinema[ c(sample(1:nrow(cinema), 10, replace=TRUE)), ]
hos.p<-hospital[ c(sample(1:nrow(hospital), 10, replace=TRUE)), ]

cin.p <- janitor::clean_names(cin.p)
hos.p <- janitor::clean_names(hos.p)

r5r_core <- setup_r5(data_path = path, verbose = FALSE)
mode<-c("WALK", "TRANSIT")
# mode<-c("WALK")
max_walk_dist<-3000
max_trip_duration<-60
departure_datetime<-as.POSIXct("04-02-2020 07:30:00", format="%d-%m-%Y %H:%M:%S")
h <- travel_time_matrix(r5r_core = r5r_core,
                        origins = cin.p,
                        destinations = hos.p,
                        mode = mode,
                        departure_datetime = departure_datetime,
                        max_walk_dist = max_walk_dist,
                        max_trip_duration = max_trip_duration,
                        verbose = FALSE)
head(h)
majki00 commented 2 years ago

Thank you for quick response @mvpsaraiva and apologies for bothering you once again, but I still am not able to resolve the issue. I used exact same code as you and tried various options of treating the POIs but the results are still not correct. In my directory 'data_acc' I have gtfs.zip, mazowieckie_osm.pbf and mazowsze_osm_clean.csv (same as mazowieckie-pois.osm.csv but clipped for Warsaw). Furthermore, I noticed that WALK and WALK or TRANSIT results are actually not identical and there are more results for WALK only, which is even stranger (shown below). I feel stuck and do not really know where should I search for the issue. I would be grateful for your suggestions.

Results for WALK

fromId toId travel_time
node/2096125794 19509 52
node/248212391 17922 58
node/248212391 15330 46
node/588807906 19509 44
node/588807906 15330 58
node/2934124990 17922 58
node/2934124990 15330 56
node/2943366220 21768 31
node/2943366220 15330 44

Results for WALK and TRANSIT

fromId toId travel_time
node/248212391 15330 46
node/588807906 19509 44
node/2943366220 21768 31
node/2943366220 15330 44

Message and errors while creating r5r network:

> r5r_core <- setup_r5(data_path = path, verbose = FALSE)
Using cached version from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/r5r/jar/r5-v6.4-all_20210820.jar
Summarizing builder config: build-config.json
{
  "htmlAnnotations" : false,
  "maxHtmlAnnotationsPerFile" : 1000,
  "transit" : true,
  "useTransfersTxt" : false,
  "parentStopLinking" : false,
  "stationTransfers" : false,
  "subwayAccessTime" : 2.0,
  "streets" : true,
  "embedRouterConfig" : true,
  "areaVisibility" : false,
  "matchBusRoutesToStreets" : false,
  "fetchElevationUS" : false,
  "speeds" : {
    "units" : "mph",
    "values" : {
      "secondary" : 35,
      "tertiary_link" : 25,
      "primary_link" : 25,
      "tertiary" : 25,
      "living_street" : 5,
      "motorway_link" : 35,
      "trunk" : 55,
      "secondary_link" : 25,
      "motorway" : 65,
      "trunk_link" : 35,
      "primary" : 45
    },
    "defaultSpeed" : 25
  },
  "staticBikeRental" : false,
  "staticParkAndRide" : true,
  "staticBikeParkAndRide" : false,
  "bikeRentalFile" : null,
  "analysisFareCalculator" : null
}
23:08:46.355 [main] ERROR com.conveyal.r5.streets.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
23:09:23.074 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 272642 has multiple 'to' members, skipping.
23:09:23.078 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 557853 has multiple 'from' members, skipping.
23:09:23.080 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 1672761, does not have from, to and via, skipping
23:09:23.083 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 1850082, does not have from, to and via, skipping
23:09:23.085 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 2006514 has multiple 'from' members, skipping.
23:09:23.085 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 2006515 has multiple 'to' members, skipping.
23:09:23.088 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 2195314, does not have from, to and via, skipping
23:09:23.088 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 2249952, does not have from, to and via, skipping
23:09:23.088 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 2310036, does not have from, to and via, skipping
23:09:23.088 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 2310037, does not have from, to and via, skipping
23:09:23.089 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 2396804, does not have from, to and via, skipping
23:09:23.089 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 2406410, does not have from, to and via, skipping
23:09:23.090 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 2525983 has multiple 'from' members, skipping.
23:09:23.091 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 2545582, does not have from, to and via, skipping
23:09:23.092 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 2611368 has multiple 'from' members, skipping.
23:09:23.094 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 2656579 has multiple 'from' members, skipping.
23:09:23.095 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 2677058, does not have from, to and via, skipping
23:09:23.095 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 2677137 has multiple 'to' members, skipping.
23:09:23.097 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 2743327, does not have from, to and via, skipping
23:09:23.101 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 2918645, does not have from, to and via, skipping
23:09:23.102 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 2995559 has multiple 'from' members, skipping.
23:09:23.102 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 2998592, does not have from, to and via, skipping
23:09:23.105 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 3102710 has multiple 'from' members, skipping.
23:09:23.108 [main] ERROR com.conveyal.r5.streets.StreetLayer - via must be single node or one or more ways, skipping restriction 3203540
23:09:23.109 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 3277398, does not have from, to and via, skipping
23:09:23.109 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 3303328 has multiple 'from' members, skipping.
23:09:23.109 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 3303329, does not have from, to and via, skipping
23:09:23.111 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 3517239 has multiple 'from' members, skipping.
23:09:23.115 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 3804587 has multiple 'from' members, skipping.
23:09:23.115 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 3838898 has multiple 'from' members, skipping.
23:09:23.119 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 3899599 has multiple 'from' members, skipping.
23:09:23.121 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 4016218, does not have from, to and via, skipping
23:09:23.125 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 4235476 has multiple 'to' members, skipping.
23:09:23.125 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 4236120, does not have from, to and via, skipping
23:09:23.130 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 5192068 has multiple 'from' members, skipping.
23:09:23.133 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5382990, does not have from, to and via, skipping
23:09:23.133 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5382991, does not have from, to and via, skipping
23:09:23.133 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5382992, does not have from, to and via, skipping
23:09:23.133 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5382993, does not have from, to and via, skipping
23:09:23.133 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5382997, does not have from, to and via, skipping
23:09:23.133 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5382998, does not have from, to and via, skipping
23:09:23.133 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5382999, does not have from, to and via, skipping
23:09:23.133 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5383000, does not have from, to and via, skipping
23:09:23.134 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 5394286 has multiple 'to' members, skipping.
23:09:23.134 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5394287, does not have from, to and via, skipping
23:09:23.134 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5394290, does not have from, to and via, skipping
23:09:23.135 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5460873, does not have from, to and via, skipping
23:09:23.135 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5461640, does not have from, to and via, skipping
23:09:23.138 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5522932, does not have from, to and via, skipping
23:09:23.142 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5848323, does not have from, to and via, skipping
23:09:23.142 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5900534, does not have from, to and via, skipping
23:09:23.142 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5900535, does not have from, to and via, skipping
23:09:23.142 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 5900536, does not have from, to and via, skipping
23:09:23.145 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 6314313, does not have from, to and via, skipping
23:09:23.146 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 6405436, does not have from, to and via, skipping
23:09:23.146 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 6405437, does not have from, to and via, skipping
23:09:23.148 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 6618805, does not have from, to and via, skipping
23:09:23.148 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 6623576, does not have from, to and via, skipping
23:09:23.151 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 6662442, does not have from, to and via, skipping
23:09:23.152 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 6662443, does not have from, to and via, skipping
23:09:23.152 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 6698219, does not have from, to and via, skipping
23:09:23.155 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 7012562, does not have from, to and via, skipping
23:09:23.156 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 7102650, does not have from, to and via, skipping
23:09:23.156 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 7102651, does not have from, to and via, skipping
23:09:23.156 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 7102655, does not have from, to and via, skipping
23:09:23.156 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 7102656, does not have from, to and via, skipping
23:09:23.159 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 7298433, does not have from, to and via, skipping
23:09:23.159 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 7299470, does not have from, to and via, skipping
23:09:23.162 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 7407119, does not have from, to and via, skipping
23:09:23.163 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 7407120, does not have from, to and via, skipping
23:09:23.167 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 7671008, does not have from, to and via, skipping
23:09:23.169 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 7868815 has multiple 'from' members, skipping.
23:09:23.170 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 7874578, does not have from, to and via, skipping
23:09:23.170 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 7908861, does not have from, to and via, skipping
23:09:23.171 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 7926964, does not have from, to and via, skipping
23:09:23.171 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 7926969, does not have from, to and via, skipping
23:09:23.171 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 8003339, no way from from to to via via, skipping
23:09:23.173 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 8214268, does not have from, to and via, skipping
23:09:23.176 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 8438372, does not have from, to and via, skipping
23:09:23.178 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 8512151, does not have from, to and via, skipping
23:09:23.178 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 8512152, does not have from, to and via, skipping
23:09:23.179 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 8552824, does not have from, to and via, skipping
23:09:23.179 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 8621613, does not have from, to and via, skipping
23:09:23.179 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 8621614, does not have from, to and via, skipping
23:09:23.179 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 8670347, does not have from, to and via, skipping
23:09:23.181 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 8799468, no way from from to to via via, skipping
23:09:23.182 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 8833741, does not have from, to and via, skipping
23:09:23.184 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 9049134, does not have from, to and via, skipping
23:09:23.185 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 9085350, does not have from, to and via, skipping
23:09:23.185 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 9088044, does not have from, to and via, skipping
23:09:23.185 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 9121968, does not have from, to and via, skipping
23:09:23.186 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 9179433, does not have from, to and via, skipping
23:09:23.189 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 9487083, does not have from, to and via, skipping
23:09:23.193 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 9604392, does not have from, to and via, skipping
23:09:23.194 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 9720909, does not have from, to and via, skipping
23:09:23.194 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 9720911, does not have from, to and via, skipping
23:09:23.194 [main] ERROR com.conveyal.r5.streets.StreetLayer - Did not find from/to edges for restriction 9740460, skipping
23:09:23.195 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 9751953 has multiple 'from' members, skipping.
23:09:23.203 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 10061733, does not have from, to and via, skipping
23:09:23.204 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 10061734 has multiple 'to' members, skipping.
23:09:23.210 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 10625487, does not have from, to and via, skipping
23:09:23.219 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 11072371, does not have from, to and via, skipping
23:09:23.220 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 11110318, does not have from, to and via, skipping
23:09:23.222 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 11298987, does not have from, to and via, skipping
23:09:23.222 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 11298988, does not have from, to and via, skipping
23:09:23.222 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 11298991, does not have from, to and via, skipping
23:09:23.222 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 11298992, does not have from, to and via, skipping
23:09:23.222 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 11298993, does not have from, to and via, skipping
23:09:23.232 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 12093810, does not have from, to and via, skipping
23:09:23.232 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 12093811, does not have from, to and via, skipping
23:09:23.232 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 12093812, does not have from, to and via, skipping
23:09:23.232 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 12093813, does not have from, to and via, skipping
23:09:23.232 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 12093814, does not have from, to and via, skipping
23:09:23.232 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 12093815, does not have from, to and via, skipping
23:09:23.234 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 12108367 has multiple 'from' members, skipping.
23:09:23.234 [main] ERROR com.conveyal.r5.streets.StreetLayer - Turn restriction 12108369 has multiple 'from' members, skipping.
23:09:23.235 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 12108595, does not have from, to and via, skipping
23:09:23.235 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 12108605, does not have from, to and via, skipping
23:09:23.238 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 12129806, does not have from, to and via, skipping
23:09:23.238 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 12131717, does not have from, to and via, skipping
23:09:23.239 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 12131835, does not have from, to and via, skipping
23:09:23.240 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 12143886, does not have from, to and via, skipping
23:09:23.243 [main] ERROR com.conveyal.r5.streets.StreetLayer - Invalid turn restriction 12182340, does not have from, to and via, skipping
23:09:23.254 [main] ERROR com.conveyal.r5.streets.StreetLayer - Restriction 12954698 has no restriction tag, skipping

Finished building network.dat at data_acc/network.dat
rafapereirabr commented 2 years ago

Hi @majki00 , could you please run sessionInfo() on Rstudio and share the output in a comment below?

majki00 commented 2 years ago

Hi @rafapereirabr , thank you for the response. Here is my sessionInfo:

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.3

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] tmap_3.3-1        forcats_0.5.0     stringr_1.4.0     dplyr_1.0.4       purrr_0.3.4       readr_1.4.0      
 [7] tidyr_1.1.2       tibble_3.1.0      tidyverse_1.3.0   mapview_2.10.0    ggplot2_3.3.2     data.table_1.14.0
[13] r5r_0.6.0         nngeo_0.4.4       sf_0.9-8          leaflet_2.0.4.1   raster_3.4-5      rgdal_1.5-23     
[19] h3_3.7.1          rJava_1.0-4       sp_1.4-5         

loaded via a namespace (and not attached):
 [1] fs_1.5.0                satellite_1.0.2         lubridate_1.7.9.2       webshot_0.5.2           RColorBrewer_1.1-2     
 [6] httr_1.4.2              tools_4.0.3             backports_1.2.0         utf8_1.1.4              R6_2.5.0               
[11] KernSmooth_2.23-17      DBI_1.1.1               colorspace_1.4-1        withr_2.3.0             tidyselect_1.1.0       
[16] curl_4.3                compiler_4.0.3          leafem_0.1.3            cli_2.1.0               rvest_0.3.6            
[21] xml2_1.3.2              checkmate_2.0.0         scales_1.1.1            classInt_0.4-3          proxy_0.4-25           
[26] nabor_0.5.0             digest_0.6.27           dichromat_2.0-0         base64enc_0.1-3         pkgconfig_2.0.3        
[31] htmltools_0.5.1.1       dbplyr_2.1.0            htmlwidgets_1.5.2       rlang_0.4.10            readxl_1.3.1           
[36] rstudioapi_0.11         generics_0.1.0          jsonlite_1.7.1          crosstalk_1.1.0.1       magrittr_2.0.1         
[41] jdx_0.1.4               Rcpp_1.0.6              munsell_0.5.0           fansi_0.4.1             abind_1.4-5            
[46] lifecycle_0.2.0         stringi_1.5.3           leafsync_0.1.0          yaml_2.2.1              snakecase_0.11.0       
[51] tmaptools_3.1           grid_4.0.3              parallel_4.0.3          crayon_1.3.4            lattice_0.20-41        
[56] haven_2.3.1             stars_0.5-2             hms_0.5.3               pillar_1.5.1            codetools_0.2-16       
[61] stats4_4.0.3            XML_3.99-0.6            reprex_1.0.0            glue_1.4.2              leaflet.providers_1.9.0
[66] modelr_0.1.8            png_0.1-7               vctrs_0.3.6             cellranger_1.1.0        gtable_0.3.0           
[71] assertthat_0.2.1        janitor_2.1.0           lwgeom_0.2-5            broom_0.7.4             e1071_1.7-6            
[76] viridisLite_0.3.0       class_7.3-17            sfheaders_0.4.0         units_0.7-1             ellipsis_0.3.1   
mvpsaraiva commented 2 years ago

Hi @majki00.

Perhaps your issue is the same as #200. Can you try plotting your origin/destination points over your transit network to see if they fit?

Also, what are your destination points? I can't find those id's in the toId column of the results you posted in the POIs csv. Maybe there's a problem with them?

majki00 commented 2 years ago

Hi @mvpsaraiva @rafapereirabr,

it seems that it finally works!! thank you very much for your help. It turned out the the issue was OpenMP support for data.table package (it was operating in a single-threaded mode). After following the instructions from this GitHub thread and installing data.table once again, r5r seems to work correctly. Thank you for your help once again.

rafapereirabr commented 2 years ago

We're glad to hear it's working . closing the issue for now.