Learn R Programming

gtfs2gps (version 1.4-0)

simplify_shapes: Simplify shapes of a GTFS file

Description

Remove points from the shapes of a GTFS file in order to reduce its size. It uses Douglas-Peucker algorithm internally.

Usage

simplify_shapes(gtfs_data, tol = 0)

Arguments

gtfs_data

A list of data.tables read using gtfs2gps::read_gtfs().

tol

Numerical tolerance value to be used by the Douglas-Peuker algorithm. The default value is 0, which means that no data will be lost.

Value

A GTFS data whose shapes is a subset of the input data.

Examples

Run this code
# NOT RUN {
poa <- read_gtfs(system.file("extdata/poa.zip", package="gtfs2gps"))

poa_simpl <- simplify_shapes(poa)
# }

Run the code above in your browser using DataLab