get_shapes_sf: Convert GTFS Shapes to Simple Features

View source: R/get_shapes_sf.R

get_shapes_sfR Documentation

Convert GTFS Shapes to Simple Features

Description

Convert GTFS Shapes to Simple Features

Usage

get_shapes_sf(gtfs)

Arguments

gtfs

A GTFS object or a 'shapes' data frame.

Value

For a data frame, one WGS84 'LINESTRING' feature per 'shape_id'. For a GTFS object, the same object with its 'shapes' table replaced by that 'sf' object. If present, 'shape_dist_traveled' is summarized as its maximum value for each shape.

See Also

[GTFSwizard::get_shapes_df()], [GTFSwizard::get_shapes()]

Examples

gtfs_sf <- get_shapes_sf(for_rail_gtfs)
shapes_sf <- get_shapes_sf(for_rail_gtfs$shapes)


GTFSwizard documentation built on Aug. 21, 2026, 5:16 p.m.