Documentation ¶
Index ¶
- Variables
- type AggrShape
- type RouteStats
- type ShapeWriter
- func (sw *ShapeWriter) WriteRouteOverviewCsv(f *gtfsparser.Feed, typeMap map[int16]string, routeAddFlds []string, ...)
- func (sw *ShapeWriter) WriteRouteShapes(f *gtfsparser.Feed, typeMap map[int16]string, routeAddFlds []string, ...) int
- func (sw *ShapeWriter) WriteShapes(f *gtfsparser.Feed, outFile string) int
- func (sw *ShapeWriter) WriteStops(f *gtfsparser.Feed, outFile string) int
- func (sw *ShapeWriter) WriteTripsExplicit(f *gtfsparser.Feed, outFile string) int
Constants ¶
This section is empty.
Variables ¶
var DEG_TO_RAD float64 = 0.017453292519943295769236907684886127134428718885417254560
var DEG_TO_RAD32 float32 = float32(DEG_TO_RAD)
Functions ¶
This section is empty.
Types ¶
type AggrShape ¶
type AggrShape struct { Shape *gtfs.Shape From float64 To float64 Trips map[string]*gtfs.Trip Routes map[string]*gtfs.Route RouteTripCount map[*gtfs.Route]int MeterLength float64 NumStops map[*gtfs.Route]int WheelchairAccessibleTrips map[*gtfs.Route]int WheelchairAccessibleStops map[*gtfs.Route]int }
AggrShape is a trip-aggregated shapes containing gtfs.Route and gtfs.Trip objects sharing the same shape
func (*AggrShape) CalcMeterLength ¶
func (as *AggrShape) CalcMeterLength()
func (*AggrShape) GetRouteIdsString ¶
GetRouteIdsString returns a comma separated list of route IDs contained in this AggrShape
func (*AggrShape) GetShortNamesString ¶
GetShortNamesString returns a comma separated list of the short names of the routes contained in this AggrShape
func (*AggrShape) GetTripIdsString ¶
GetTripIdsString returns a comma separated list of trip IDs contained in this AggrShape
type RouteStats ¶
type ShapeWriter ¶
type ShapeWriter struct {
// contains filtered or unexported fields
}
ShapeWriter writes shapes to a shapefile
func NewShapeWriter ¶
func NewShapeWriter(projection string, motMap map[int16]bool, fldMap map[string]string) *ShapeWriter
NewShapeWriter creates a new ShapeWriter, writing in the specified projection (as proj4 string)
func (*ShapeWriter) WriteRouteOverviewCsv ¶
func (sw *ShapeWriter) WriteRouteOverviewCsv(f *gtfsparser.Feed, typeMap map[int16]string, routeAddFlds []string, outFile string)
func (*ShapeWriter) WriteRouteShapes ¶
func (sw *ShapeWriter) WriteRouteShapes(f *gtfsparser.Feed, typeMap map[int16]string, routeAddFlds []string, outFile string) int
func (*ShapeWriter) WriteShapes ¶
func (sw *ShapeWriter) WriteShapes(f *gtfsparser.Feed, outFile string) int
WriteShapes writes the shapes contained in Feed f to outFile, with each shape containing aggregrated trip/route information
func (*ShapeWriter) WriteStops ¶
func (sw *ShapeWriter) WriteStops(f *gtfsparser.Feed, outFile string) int
WriteStops writes the stations contained in Feed f to outFile
func (*ShapeWriter) WriteTripsExplicit ¶
func (sw *ShapeWriter) WriteTripsExplicit(f *gtfsparser.Feed, outFile string) int
WriteTripsExplicit writes the shapes contained in Feed f to outFile, with each trip as an explicit geometry with all trip attributes