shape

package
v0.0.0-...-5e50ffb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2024 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DEG_TO_RAD float64 = 0.017453292519943295769236907684886127134428718885417254560
View Source
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 NewAggrShape

func NewAggrShape() *AggrShape

NewAggrShape returns a new AggrShape instance

func (*AggrShape) CalcMeterLength

func (as *AggrShape) CalcMeterLength()

func (*AggrShape) GetRouteIdsString

func (as *AggrShape) GetRouteIdsString() string

GetRouteIdsString returns a comma separated list of route IDs contained in this AggrShape

func (*AggrShape) GetShortNamesString

func (as *AggrShape) GetShortNamesString() string

GetShortNamesString returns a comma separated list of the short names of the routes contained in this AggrShape

func (*AggrShape) GetTripIdsString

func (as *AggrShape) GetTripIdsString() string

GetTripIdsString returns a comma separated list of trip IDs contained in this AggrShape

type RouteStats

type RouteStats struct {
	TotLength float64
	TotFreq   int
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL