Show / Hide Table of Contents

Class RoutingNetwork

Represents a routing network.

Inheritance
System.Object
RoutingNetwork
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class RoutingNetwork

Constructors

RoutingNetwork(GeometricGraph, Single)

Creates a new routing network.

Declaration
public RoutingNetwork(GeometricGraph graph, float maxEdgeDistance = 5000F)
Parameters
GeometricGraph graph

System.Single maxEdgeDistance

RoutingNetwork(MemoryMap, GeometricGraph, Single)

Creates a new routing network.

Declaration
public RoutingNetwork(MemoryMap map, GeometricGraph graph, float maxEdgeDistance = 5000F)
Parameters
MemoryMap map

GeometricGraph graph

System.Single maxEdgeDistance

RoutingNetwork(MemoryMap, RoutingNetworkProfile, Single)

Creates a new routing network.

Declaration
public RoutingNetwork(MemoryMap map, RoutingNetworkProfile profile, float maxEdgeDistance = 5000F)
Parameters
MemoryMap map

RoutingNetworkProfile profile

System.Single maxEdgeDistance

RoutingNetwork(MemoryMap, Single)

Creates a new routing network.

Declaration
public RoutingNetwork(MemoryMap map, float maxEdgeDistance = 5000F)
Parameters
MemoryMap map

System.Single maxEdgeDistance

RoutingNetwork(Single)

Creates a new routing network.

Declaration
public RoutingNetwork(float maxEdgeDistance = 5000F)
Parameters
System.Single maxEdgeDistance

Properties

EdgeCount

Returns the number of edges in this graph.

Declaration
public long EdgeCount { get; }
Property Value
System.Int64

GeometricGraph

Returns the geometric graph.

Declaration
public GeometricGraph GeometricGraph { get; }
Property Value
GeometricGraph

IsSimple

Returns true if this network is simple (max one edge between any two vertices).

Declaration
public bool IsSimple { get; }
Property Value
System.Boolean

MaxEdgeDistance

Returns the maximum edge distance.

Declaration
public float MaxEdgeDistance { get; }
Property Value
System.Single

VertexCount

Returns the number of vertices in this graph.

Declaration
public uint VertexCount { get; }
Property Value
System.UInt32

Methods

AddEdge(UInt32, UInt32, EdgeData, ShapeBase)

Adds a new edge.

Declaration
public uint AddEdge(uint vertex1, uint vertex2, EdgeData data, ShapeBase shape)
Parameters
System.UInt32 vertex1

System.UInt32 vertex2

EdgeData data

ShapeBase shape

Returns
System.UInt32

AddVertex(UInt32, Single, Single)

Adds a new vertex.

Declaration
public void AddVertex(uint vertex, float latitude, float longitude)
Parameters
System.UInt32 vertex

System.Single latitude

System.Single longitude

AddVertex(UInt32, Single, Single, Nullable<Int16>)

Adds a new vertex.

Declaration
public void AddVertex(uint vertex, float latitude, float longitude, short ? elevation)
Parameters
System.UInt32 vertex

System.Single latitude

System.Single longitude

System.Nullable<System.Int16> elevation

Compress()

Relocates data internally in the most compact way possible.

Declaration
public void Compress()

Compress(Action<UInt32, UInt32>)

Relocates data internally in the most compact way possible.

Declaration
public void Compress(Action<uint, uint> updateEdgeId)
Parameters
Action<System.UInt32, System.UInt32> updateEdgeId

Deserialize(Stream, RoutingNetworkProfile)

Deserializes from a stream.

Declaration
public static RoutingNetwork Deserialize(Stream stream, RoutingNetworkProfile profile)
Parameters
Stream stream

RoutingNetworkProfile profile

Returns
RoutingNetwork

Dispose()

Disposes.

Declaration
public void Dispose()

GetEdge(UInt32)

Gets the edge with the given id.

Declaration
public RoutingEdge GetEdge(uint edgeId)
Parameters
System.UInt32 edgeId

Returns
RoutingEdge

GetEdgeEnumerator()

Gets an empty edge enumerator.

Declaration
public RoutingNetwork.EdgeEnumerator GetEdgeEnumerator()
Returns
RoutingNetwork.EdgeEnumerator

GetEdgeEnumerator(UInt32)

Gets an edge enumerator for the given vertex.

Declaration
public RoutingNetwork.EdgeEnumerator GetEdgeEnumerator(uint vertex)
Parameters
System.UInt32 vertex

Returns
RoutingNetwork.EdgeEnumerator

GetVertex(UInt32)

Gets the vertex.

Declaration
public Coordinate GetVertex(uint vertex)
Parameters
System.UInt32 vertex

Returns
Coordinate

GetVertex(UInt32, out Single, out Single)

Gets the vertex.

Declaration
public bool GetVertex(uint vertex, out float latitude, out float longitude)
Parameters
System.UInt32 vertex

System.Single latitude

System.Single longitude

Returns
System.Boolean

RemoveEdge(UInt32)

Removes the given edge.

Declaration
public bool RemoveEdge(uint edgeId)
Parameters
System.UInt32 edgeId

Returns
System.Boolean

RemoveEdges(UInt32)

Removes all edges from/to the given vertex.

Declaration
public int RemoveEdges(uint vertex)
Parameters
System.UInt32 vertex

Returns
System.Int32

RemoveEdges(UInt32, UInt32)

Removes the given edge.

Declaration
public int RemoveEdges(uint vertex1, uint vertex2)
Parameters
System.UInt32 vertex1

System.UInt32 vertex2

Returns
System.Int32

RemoveVertex(UInt32)

Gets the vertex.

Declaration
public bool RemoveVertex(uint vertex)
Parameters
System.UInt32 vertex

Returns
System.Boolean

Serialize(Stream)

Serializes to a stream.

Declaration
public long Serialize(Stream stream)
Parameters
System.IO.Stream stream

Returns
System.Int64

Serialize(Stream, Action<UInt32, UInt32>)

Serializes to a stream.

Declaration
public long Serialize(Stream stream, Action<uint, uint> updateEdgeId)
Parameters
System.IO.Stream stream

Action<System.UInt32, System.UInt32> updateEdgeId

Returns
System.Int64

Switch(UInt32, UInt32)

Switches the two vertices.

Declaration
public void Switch(uint vertex1, uint vertex2)
Parameters
System.UInt32 vertex1

System.UInt32 vertex2

Trim()

Resizes the internal data structures to their smallest size possible.

Declaration
public void Trim()

UpdateEdgeData(UInt32, EdgeData)

Updates the data associated with the given edge.

Declaration
public void UpdateEdgeData(uint edgeId, EdgeData data)
Parameters
System.UInt32 edgeId

EdgeData data

Back to top Built by Itinero, MIT licensed.