powered by
Convert stops into Simple Features Points
stops_as_sf(stops, crs = NULL)
an sf dataframe for gtfs routes with a point column
a gtfs$stops dataframe
optional coordinate reference system (used by sf::st_transform) to transform lon/lat coordinates
gtfs_as_sf
data(gtfs_duke) some_stops <- gtfs_duke$stops[sample(nrow(gtfs_duke$stops), 40),] some_stops_sf <- stops_as_sf(some_stops) plot(some_stops_sf[,"stop_name"])
Run the code above in your browser using DataLab