The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Opendata::GTFS::Feed - Parse General Transit Feeds (GTFS)

Requires Perl 5.10+ Travis status Distribution kwalitee CPAN Testers result coverage 95.2%

VERSION

Version 0.0202, released 2016-02-28.

SYNOPSIS

    use Opendata::GTFS::Feed;
    my $feed = Opendata::GTFS::Feed->parse(file => 'a-gtfs-feed.zip', directory => 'feed');

DESCRIPTION

Opendata::GTFS::Feed is an easy way to parse GTFS feeds.

ATTRIBUTES

All list attributes has the Array trait. Currently the following public methods are created for those attributes:

  • elements -> all_$attribute, where $attribute is the attribute name.

  • count -> count_$attribute

file

AbsPath optional read-only

If file is given, the feed in the file will be parsed.

url

Uri optional read-only

If url is given, the feed at the url will be fetched and parsed.

directory

AbsPath optional read-only

If only directory is given, it is expected to find a fully extracted feed in that directory. If C is given together with either file or url, the feed will be extracted into that directory (and remain there).

agencies

ArrayRef [ Agency ] not in constructor read-only

calendar_dates

ArrayRef [ CalendarDate ] not in constructor read-only

calendars

ArrayRef [ Calendar ] not in constructor read-only

fare_attributes

ArrayRef [ FareAttribute ] not in constructor read-only

fare_rules

ArrayRef [ FareRule ] not in constructor read-only

frequencies

ArrayRef [ Frequency ] not in constructor read-only

routes

ArrayRef [ Route ] not in constructor read-only

shapes

ArrayRef [ Shape ] not in constructor read-only

stop_times

ArrayRef [ StopTime ] not in constructor read-only

stops

ArrayRef [ Stop ] not in constructor read-only

transfers

ArrayRef [ Transfer ] not in constructor read-only

trips

ArrayRef [ Trip ] not in constructor read-only

SOURCE

https://github.com/Csson/p5-Opendata-GTFS-Feed

HOMEPAGE

https://metacpan.org/release/Opendata-GTFS-Feed

AUTHOR

Erik Carlsson <info@code301.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Erik Carlsson.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.