View source: R/convert_shapes_to_sf.R
convert_shapes_to_sf | R Documentation |
shapes
table to simple feature objectConverts the shapes
table to a LINESTRING sf
object.
convert_shapes_to_sf(gtfs, shape_id = NULL, crs = 4326, sort_sequence = FALSE)
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
|
sort_sequence |
A logical. Whether to sort shapes by
|
A LINESTRING sf
object.
# read gtfs
data_path <- system.file("extdata/spo_gtfs.zip", package = "gtfstools")
gtfs <- read_gtfs(data_path)
shapes_sf <- convert_shapes_to_sf(gtfs)
head(shapes_sf)
shapes_sf <- convert_shapes_to_sf(gtfs, shape_id = "17846")
shapes_sf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.