Class RoutingNetworkExtensions
Contains extension methods for the routing network.
Inheritance
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public static class RoutingNetworkExtensions
Methods
AddEdge(RoutingNetwork, UInt32, UInt32, EdgeData, Coordinate[])
Adds a new edge.
Declaration
public static uint AddEdge(this RoutingNetwork network, uint vertex1, uint vertex2, EdgeData data, params Coordinate[] shape)
Parameters
|
RoutingNetwork
network
|
|
System.UInt32
vertex1
|
|
System.UInt32
vertex2
|
|
EdgeData
data
|
|
Coordinate[]
shape
|
Returns
|
System.UInt32
|
AddEdge(RoutingNetwork, UInt32, UInt32, EdgeData, IEnumerable<Coordinate>)
Adds a new edge.
Declaration
public static uint AddEdge(this RoutingNetwork network, uint vertex1, uint vertex2, EdgeData data, IEnumerable<Coordinate> shape)
Parameters
|
RoutingNetwork
network
|
|
System.UInt32
vertex1
|
|
System.UInt32
vertex2
|
|
EdgeData
data
|
|
IEnumerable<Coordinate>
shape
|
Returns
|
System.UInt32
|
AddEdge(RoutingNetwork, UInt32, UInt32, UInt16, UInt32, Single, Coordinate[])
Adds a new edge.
Declaration
public static uint AddEdge(this RoutingNetwork network, uint vertex1, uint vertex2, ushort profile, uint metaId, float distance, params Coordinate[] shape)
Parameters
|
RoutingNetwork
network
|
|
System.UInt32
vertex1
|
|
System.UInt32
vertex2
|
|
System.UInt16
profile
|
|
System.UInt32
metaId
|
|
System.Single
distance
|
|
Coordinate[]
shape
|
Returns
|
System.UInt32
|
AddEdge(RoutingNetwork, UInt32, UInt32, UInt16, UInt32, Single, IEnumerable<Coordinate>)
Adds a new edge.
Declaration
public static uint AddEdge(this RoutingNetwork network, uint vertex1, uint vertex2, ushort profile, uint metaId, float distance, IEnumerable<Coordinate> shape)
Parameters
|
RoutingNetwork
network
|
|
System.UInt32
vertex1
|
|
System.UInt32
vertex2
|
|
System.UInt16
profile
|
|
System.UInt32
metaId
|
|
System.Single
distance
|
|
IEnumerable<Coordinate>
shape
|
Returns
|
System.UInt32
|
ContainsEdge(RoutingNetwork, UInt32, UInt32)
Returns true if the routing network contains an edge between the two given vertices.
Declaration
public static bool ContainsEdge(this RoutingNetwork network, uint vertex1, uint vertex2)
Parameters
|
RoutingNetwork
network
|
|
System.UInt32
vertex1
|
|
System.UInt32
vertex2
|
Returns
|
System.Boolean
|
DirectedEdgeId(RoutingNetwork.EdgeEnumerator)
Returns a directed version of the edge-id. Smaller than 0 if inverted, as-is if not inverted.
Declaration
public static DirectedEdgeId DirectedEdgeId(this RoutingNetwork.EdgeEnumerator enumerator)
Parameters
|
RoutingNetwork.EdgeEnumerator
enumerator
|
Returns
|
DirectedEdgeId
|
Remarks
The relationship between a regular edge id and a directed edge id:
- 0 -> 1 forward, -1 backward.
- all other id's are offset by 1 and postive when forward, negative when backward.
GetEdge(RoutingNetwork, Int64)
Gets the edge represented by the given directed id.
Declaration
public static RoutingEdge GetEdge(this RoutingNetwork graph, long directedEdgeId)
Parameters
|
RoutingNetwork
graph
|
|
System.Int64
directedEdgeId
|
Returns
|
RoutingEdge
|
GetEdges(RoutingNetwork, UInt32)
Gets all edges starting at this edges.
Declaration
public static List<RoutingEdge> GetEdges(this RoutingNetwork network, uint vertex)
Parameters
|
RoutingNetwork
network
|
|
System.UInt32
vertex
|
Returns
|
List<RoutingEdge>
|
GetFirstPoint(RoutingNetwork, RoutingEdge, UInt32)
Gets the first point on the given edge starting a the given vertex.
Declaration
public static Coordinate GetFirstPoint(this RoutingNetwork graph, RoutingEdge edge, uint vertex)
Parameters
|
RoutingNetwork
graph
|
|
RoutingEdge
edge
|
|
System.UInt32
vertex
|
Returns
|
Coordinate
|
GetOther(RoutingEdge, UInt32)
Gets the vertex on this edge that is not the given vertex.
Declaration
public static uint GetOther(this RoutingEdge edge, uint vertex)
Parameters
|
RoutingEdge
edge
|
|
System.UInt32
vertex
|
Returns
|
System.UInt32
|
GetShape(RoutingNetwork, RoutingEdge)
Gets the shape points including the two vertices.
Declaration
public static List<Coordinate> GetShape(this RoutingNetwork graph, RoutingEdge edge)
Parameters
|
RoutingNetwork
graph
|
|
RoutingEdge
edge
|
Returns
|
List<Coordinate>
|
IdDirected(RoutingEdge)
Returns a directed version of the edge-id. Smaller than 0 if inverted, as-is if not inverted.
Declaration
public static long IdDirected(this RoutingEdge edge)
Parameters
|
RoutingEdge
edge
|
Returns
|
System.Int64
|
Remarks
The relationship between a regular edge id and a directed edge id:
- 0 -> 1 forward, -1 backward.
- all other id's are offset by 1 and postive when forward, negative when backward.
IdDirected(RoutingNetwork.EdgeEnumerator)
Returns a directed version of the edge-id. Smaller than 0 if inverted, as-is if not inverted.
Declaration
public static long IdDirected(this RoutingNetwork.EdgeEnumerator edge)
Parameters
|
RoutingNetwork.EdgeEnumerator
edge
|
Returns
|
System.Int64
|
Remarks
The relationship between a regular edge id and a directed edge id:
- 0 -> 1 forward, -1 backward.
- all other id's are offset by 1 and postive when forward, negative when backward.
LocationOnNetwork(RoutingNetwork, UInt32, UInt16)
Returns the location on the network.
Declaration
public static Coordinate LocationOnNetwork(this RoutingNetwork network, uint edgeId, ushort offset)
Parameters
|
RoutingNetwork
network
|
|
System.UInt32
edgeId
|
|
System.UInt16
offset
|
Returns
|
Coordinate
|
MergeVertices(RoutingNetwork, UInt32, UInt32)
Merges vertex2 into vertex1.
Declaration
public static void MergeVertices(this RoutingNetwork network, uint vertex1, uint vertex2)
Parameters
|
RoutingNetwork
network
|
|
System.UInt32
vertex1
|
|
System.UInt32
vertex2
|
MoveToEdge(RoutingNetwork.EdgeEnumerator, Int64)
Moves to the given directed edge-id.
Declaration
public static void MoveToEdge(this RoutingNetwork.EdgeEnumerator enumerator, long directedEdgeId)
Parameters
|
RoutingNetwork.EdgeEnumerator
enumerator
|
|
System.Int64
directedEdgeId
|