Closed Joaobazzo closed 3 years ago
I think it's a problem with shape_id
data. I'm not sure if there's something we can do.
# read
gps_point <- gtfs2gps::read_gtfs("../data-raw/gtfs/bra_poa/bra_poa.zip") %>%
gtfs2gps::filter_by_shape_id("A19-1")
# shape
gps_shape <- sfheaders::sf_multipoint(gps_point$shapes,
x = 'shape_pt_lon',
y = 'shape_pt_lat') %>%
sf::st_as_sf() %>% sf::st_set_crs(4326)
# stop
gps_stop <- sfheaders::sf_multipoint(gps_point$stops,
x = 'stop_lon',
y = 'stop_lat') %>%
sf::st_as_sf() %>% sf::st_set_crs(4326)
# view
mapview(gps_stop$geometry)
mapview(gps_shape$geometry)
This is our stops
file. Seems right.
however, this is our shapes
file. there are several points in the middle of nowhere
I'm thinking of simply manually exclude those very distance points.
Hm... yep. This seems to be an error with the GTFS Feed. Nothing really the package could do about. I agree the best approach to this would be to manually exclude those points.
Problem with specific shape_id of Porto Alegre GTFS (link).
It seems that the last stop_id is connecting to the first one.
I'm still trying to figure out what's happening. If I find anything I'll share here.