mapctx

package
v0.0.0-...-69178d2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection interface {
	From() Node
	To() Node
	GetCost() float64
	Via() osm.Object
}

type ConnectionImpl

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

func (*ConnectionImpl) CalcAttribute

func (c *ConnectionImpl) CalcAttribute() *ConnectionImpl

func (ConnectionImpl) CalcTimeFactor

func (c ConnectionImpl) CalcTimeFactor() float64

func (ConnectionImpl) From

func (c ConnectionImpl) From() Node

func (*ConnectionImpl) GetAttributes

func (c *ConnectionImpl) GetAttributes() map[string]string

func (ConnectionImpl) GetCost

func (c ConnectionImpl) GetCost() float64

func (ConnectionImpl) GetLength

func (c ConnectionImpl) GetLength() float64

func (*ConnectionImpl) SetAttributes

func (c *ConnectionImpl) SetAttributes(attr map[string]string) *ConnectionImpl

func (ConnectionImpl) To

func (c ConnectionImpl) To() Node

func (ConnectionImpl) Via

func (c ConnectionImpl) Via() osm.Object

type ConnectionSpec

type ConnectionSpec interface {
	CanWalk() bool
	CanDrive() bool
	CanPublicTransport() bool

	TimeFactor() float64
	CostFactor() float64
	SustainableFactor() float64
}

type ConnectionSpecAreaToAvoid

type ConnectionSpecAreaToAvoid interface {
	ConnectionSpec
	CheckPointExclusion(lat, lon float64) bool
}

type GetRemainingTimeForBus

type GetRemainingTimeForBus interface {
	ConnectionSpec
	// CheckPointExclusion return wait time value in second
	// station is the FeatureID of the bus stop in question
	WaitTime(station string) int64
}

type MapCtx

type MapCtx struct {
	mapindex.Map
	// contains filtered or unexported fields
}

func NewMapCtx

func NewMapCtx(maps mapindex.Map, mapFile *os.File) *MapCtx

func (MapCtx) CreateBikeInterconnections

func (c MapCtx) CreateBikeInterconnections(spec ConnectionSpec, ret []Connection, fromNode *osm.Node) []Connection

func (MapCtx) CreateInterconnections

func (c MapCtx) CreateInterconnections(relations osm.FeatureIDs, spec ConnectionSpec, ret []Connection, fromNode *osm.Node, associatedNodeID osm.FeatureIDs) []Connection

func (*MapCtx) GetNodeFromOSMNode

func (c *MapCtx) GetNodeFromOSMNode(osmNode *osm.Node) Node

func (MapCtx) GetNodeWithInterconnection

func (c MapCtx) GetNodeWithInterconnection(Lat, Lon float64, spec ConnectionSpec) []Node

func (MapCtx) GetNodeWithInterconnection4

func (c MapCtx) GetNodeWithInterconnection4(Lat, Lon float64, spec ConnectionSpec, mask int) []Node

func (*MapCtx) GetRouteFactor

func (c *MapCtx) GetRouteFactor(name string) float64

func (*MapCtx) GetRouteFactor3

func (c *MapCtx) GetRouteFactor3(time, cost, sustainable float64) float64

func (MapCtx) ListRoutes

func (c MapCtx) ListRoutes(FeaID string, spec ConnectionSpec) []Connection

func (*MapCtx) NewConnection

func (c *MapCtx) NewConnection(from, to *osm.Node, via osm.Object) Connection

func (*MapCtx) NewConnection5

func (c *MapCtx) NewConnection5(from, to, exact *osm.Node, via osm.Object, discount float64) Connection

func (MapCtx) ResolveInfoFromID

func (c MapCtx) ResolveInfoFromID(FeaID string) *osm.Object

func (*MapCtx) SetSpec

func (c *MapCtx) SetSpec(spec ConnectionSpec)

type MapLocationDistanceSlice

type MapLocationDistanceSlice struct {
	OriginLat float64
	OriginLon float64
	// contains filtered or unexported fields
}

func (MapLocationDistanceSlice) Len

func (p MapLocationDistanceSlice) Len() int

func (MapLocationDistanceSlice) Less

func (p MapLocationDistanceSlice) Less(i, j int) bool

func (MapLocationDistanceSlice) Swap

func (p MapLocationDistanceSlice) Swap(i, j int)

type Node

type Node interface {
	astar.Pather
	FindConnection(ConnectionSpec) []Connection
	PathNeighborVia(to astar.Pather) osm.Object
}

type NodeDistanceSlice

type NodeDistanceSlice struct {
	OriginLat float64
	OriginLon float64
	// contains filtered or unexported fields
}

func (NodeDistanceSlice) Len

func (p NodeDistanceSlice) Len() int

func (NodeDistanceSlice) Less

func (p NodeDistanceSlice) Less(i, j int) bool

func (NodeDistanceSlice) Swap

func (p NodeDistanceSlice) Swap(i, j int)

type NodeGDistanceSlice

type NodeGDistanceSlice struct {
	OriginLat float64
	OriginLon float64
	// contains filtered or unexported fields
}

func (NodeGDistanceSlice) Len

func (p NodeGDistanceSlice) Len() int

func (NodeGDistanceSlice) Less

func (p NodeGDistanceSlice) Less(i, j int) bool

func (NodeGDistanceSlice) Swap

func (p NodeGDistanceSlice) Swap(i, j int)

type NodeImpl

type NodeImpl struct {
	*osm.Node
	// contains filtered or unexported fields
}

func (NodeImpl) FindConnection

func (n NodeImpl) FindConnection(spec ConnectionSpec) []Connection

func (NodeImpl) PathEstimatedCost

func (n NodeImpl) PathEstimatedCost(to astar.Pather) float64

func (NodeImpl) PathNeighborConnection

func (n NodeImpl) PathNeighborConnection(to astar.Pather) *ConnectionImpl

func (NodeImpl) PathNeighborCost

func (n NodeImpl) PathNeighborCost(to astar.Pather) float64

func (NodeImpl) PathNeighborVia

func (n NodeImpl) PathNeighborVia(to astar.Pather) osm.Object

func (*NodeImpl) PathNeighbors

func (n *NodeImpl) PathNeighbors() []astar.Pather

Jump to

Keyboard shortcuts

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