write_gtfs: Write GTFS Data to Zip File

View source: R/write_gtfs.R

write_gtfsR Documentation

Write GTFS Data to Zip File

Description

'write_gtfs' exports a GTFS object to a zip file format, suitable for use in various GTFS-compatible software. This function supports multiple GTFS object formats and ensures compatibility by converting data frames and spatial objects as needed.

Usage

write_gtfs(gtfs, zipfile, ...)

Arguments

gtfs

A GTFS object. This can be in 'wizardgtfs' or list format.

zipfile

A character string specifying the path to the output zip file.

...

Additional arguments to pass to 'gtfsio::export_gtfs()'.

Details

The function converts spatial data frames (e.g., shapes and stops) to standard data frames, removes additional service pattern tables, and exports.

Value

None. This function writes the GTFS data directly to the specified 'zipfile'.

See Also

[GTFSwizard::read_gtfs()], [GTFSwizard::as_wizardgtfs()],

Examples

## Not run: 
# Export a wizardgtfs object to a zip file
write_gtfs(for_rail_gtfs, "gtfs_export.zip")

## End(Not run)


GTFSwizard documentation built on April 4, 2025, 4:10 a.m.