gtfs_shapes_as_sf: Convert GTFS shapes to simple feature object

View source: R/gtfs_as_sf.R

gtfs_shapes_as_sfR Documentation

Convert GTFS shapes to simple feature object

Description

Convert a GTFS shapes data loaded using gtfs2gps::read_gtf() into a line simple feature (sf).

Usage

gtfs_shapes_as_sf(gtfs, crs = 4326)

Arguments

gtfs

A GTFS data.

crs

The coordinate reference system represented as an EPSG code. The default value is 4326 (latlong WGS84)

Value

A simple feature (sf) object.

Examples

poa <- read_gtfs(system.file("extdata/saopaulo.zip", package = "gtfs2gps"))
poa_sf <- gtfs_shapes_as_sf(poa)

ipeaGIT/gtfs2gps documentation built on Oct. 13, 2024, 6:34 p.m.