Popularity
3.0
Growing
Activity
1.0
-
25
3
12
Programming language: Go
License: GNU General Public License v3.0 only
Tags:
Files
Latest version: v1.1.0
go-gtfs alternatives and similar packages
Based on the "Files" category.
Alternatively, view go-gtfs alternatives based on common mentions on social networks and blogs.
-
vfs
A pluggable, extensible, and opinionated set of filesystem functionality for Go across a number of filesystem types such as os, S3, and GCS. -
go-exiftool
Go bindings for ExifTool, the well-known library used to extract as much metadata as possible (EXIF, IPTC, ...) from files (pictures, PDF, office, ...). -
gut/yos
Simple and reliable package for file operations like copy/move/diff/list on files, directories and symbolic links. -
fileconversion
A Go library to convert various file formats to plaintext and provide related functions -
go-staticfiles
Collects assets (css, js, images...) from a different locations, tags file names with a hash for easy versioning and aggressive caching.
Get performance insights in less than 4 minutes
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Sponsored
scoutapm.com
Do you think we are missing an alternative of go-gtfs or a related project?
Popular Comparisons
README
go-gtfs
Load GTFS files in golang
Install
go get github.com/artonge/go-gtfs
Examples
Load one directory containing GTFS files:
path/to/gtfs_files
├── agency.txt
├── calendar_dates.txt
├── calendar.txt
├── routes.txt
├── stops.txt
├── stop_times.txt
├── transfers.txt
└── trips.txt
g, err := gtfs.Load("path/to/gtfs_files", nil)
Load a directory containing sub directories containing GTFS files:
path/to/gtfs_directories
├── gtfs1
│ ├── agency.txt
│ ├── calendar_dates.txt
│ ├── routes.txt
│ ├── stops.txt
│ ├── stop_times.txt
│ ├── transfers.txt
│ └── trips.txt
└── gtfs2
├── agency.txt
├── calendar_dates.txt
├── calendar.txt
├── routes.txt
├── stops.txt
├── stop_times.txt
├── transfers.txt
└── trips.txt
gs, err := gtfs.LoadSplitted("path/to/gtfs_directories", nil)
You can then access the data through the GTFS structure. That structure contains arrays of approriate structures for each files.
type GTFS struct {
Path string // The path to the containing directory
Agency Agency
Routes []Route
Stops []Stop
StopsTimes []Stop
Trips []Trip
Calendars []Calendar
Transfers []Transfer
}
type Route struct {
ID string `csv:"route_id"`
AgencyID string `csv:"agency_id"`
ShortName string `csv:"route_short_name"`
LongName string `csv:"route_long_name"`
Type int `csv:"route_type"`
Desc string `csv:"route_url"`
URL string `csv:"route_desc"`
Color string `csv:"route_color"`
TextColor string `csv:"route_text_color"`
}
...
Contributions
Pull requests are welcome ! :)