extract

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Overview

Package extract provides tools and utilities for extracting subsets of GTFS feeds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Marker

type Marker struct {
	// contains filtered or unexported fields
}

Marker selects entities specified during the Filter method.

func NewMarker

func NewMarker() Marker

NewMarker returns a new Marker.

func (*Marker) AddExclude added in v0.14.0

func (em *Marker) AddExclude(filename string, eid string)

func (*Marker) AddInclude added in v0.14.0

func (em *Marker) AddInclude(filename string, eid string)

func (*Marker) Count added in v0.14.0

func (em *Marker) Count() int

func (*Marker) Filter

func (em *Marker) Filter(reader adapters.Reader) error

Filter takes a Reader and selects any entities that are children of the specified file/id map.

func (*Marker) IsMarked

func (em *Marker) IsMarked(filename, eid string) bool

IsMarked returns if an Entity is marked.

func (*Marker) IsVisited

func (em *Marker) IsVisited(filename string, eid string) bool

IsVisited returns if an Entity was visited.

func (*Marker) Mark added in v0.14.0

func (em *Marker) Mark(filename string, eid string, val bool)

func (*Marker) SetBbox added in v0.18.0

func (em *Marker) SetBbox(bbox string) error

type SetterFilter added in v0.7.1

type SetterFilter struct {
	// contains filtered or unexported fields
}

SetterFilter overrides entity values using a copier filter.

func NewSetterFilter

func NewSetterFilter() *SetterFilter

NewSetterFilter returns an initialized SetterFilter.

func (*SetterFilter) AddValue added in v0.7.1

func (tx *SetterFilter) AddValue(filename string, eid string, key string, value string)

AddValue sets a new value to override.

func (*SetterFilter) AddValuesFromFile added in v0.7.1

func (tx *SetterFilter) AddValuesFromFile(filename string) error

AddValuesFromFile reads a CSV file and calls AddValue on each row.

func (*SetterFilter) Filter added in v0.7.1

func (tx *SetterFilter) Filter(ent tt.Entity, emap *tt.EntityMap) error

Filter overrides values on entities.

Jump to

Keyboard shortcuts

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