stops_as_sf: Convert stops into Simple Features Points

View source: R/spatial.R

stops_as_sfR Documentation

Convert stops into Simple Features Points

Description

Convert stops into Simple Features Points

Usage

stops_as_sf(stops, crs = NULL)

Arguments

stops

a gtfs$stops dataframe

crs

optional coordinate reference system (used by sf::st_transform) to transform lon/lat coordinates

Value

an sf dataframe for gtfs routes with a point column

See Also

gtfs_as_sf

Examples

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"])

tidytransit documentation built on Oct. 18, 2024, 5:13 p.m.