View source: R/get_shapes_geometry.R
| get_shapes_geometry | R Documentation |
shapes table with spatial geometryConverts the shapes table to a LINESTRING sf object.
get_shapes_geometry(gtfs, shape_id = NULL, crs = 4326)
gtfs |
A GTFS object, as created by |
shape_id |
A character vector including the |
crs |
The CRS of the resulting object, either as an EPSG code or as an
|
A LINESTRING sf object.
# read gtfs
data_path <- system.file("extdata/spo_gtfs.zip", package = "gtfstools")
gtfs <- read_gtfs(data_path)
shapes_sf <- get_shapes_geometry(gtfs)
head(shapes_sf)
shapes_sf <- get_shapes_geometry(gtfs, shape_id = "17846")
shapes_sf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.