Show / Hide Table of Contents

Class RouterBaseExtensions

Contains extension methods on top of the RouterBase abstract class.

Inheritance
System.Object
RouterBaseExtensions
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 static class RouterBaseExtensions

Fields

DefaultConnectivityRadius

The default connectivity radius.

Declaration
public const float DefaultConnectivityRadius = 250F
Field Value
System.Single

Methods

Calculate(RouterBase, IProfileInstance, Coordinate, Coordinate)

Calculates a route between the two locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, Coordinate source, Coordinate target)
Parameters
RouterBase router

IProfileInstance profile

Coordinate source

Coordinate target

Returns
Route

Calculate(RouterBase, IProfileInstance, Coordinate, Coordinate, CancellationToken)

Calculates a route between the two locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, Coordinate source, Coordinate target, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

Coordinate source

Coordinate target

CancellationToken cancellationToken

Returns
Route

Calculate(RouterBase, IProfileInstance, Coordinate[])

Calculates a route along the given locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, Coordinate[] locations)
Parameters
RouterBase router

IProfileInstance profile

Coordinate[] locations

Returns
Route

Calculate(RouterBase, IProfileInstance, Coordinate[], CancellationToken)

Calculates a route along the given locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, Coordinate[] locations, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

Coordinate[] locations

CancellationToken cancellationToken

Returns
Route

Calculate(RouterBase, IProfileInstance, Coordinate[], Single, Nullable<Single>[], CancellationToken)

Calculates a route along the given locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, Coordinate[] locations, float turnPenalty = 0F, float ? [] preferredDirections = null, CancellationToken cancellationToken = null)
Parameters
RouterBase router

The router.

IProfileInstance profile

The profile.

Coordinate[] locations

The locations to route along.

System.Single turnPenalty

The turn penalty, if any.

System.Nullable<System.Single>[] preferredDirections

The perferred directions in degrees.

CancellationToken cancellationToken

The cancellation token, if any.

Returns
Route

A route along all the given locations.

Calculate(RouterBase, IProfileInstance, Coordinate[], Single, Tuple<Nullable<Boolean>, Nullable<Boolean>>[], CancellationToken)

Calculates a route along the given locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, Coordinate[] locations, float turnPenalty = 0F, Tuple<bool ? , bool ? >[] preferredTurns = null, CancellationToken cancellationToken = null)
Parameters
RouterBase router

The router.

IProfileInstance profile

The profile.

Coordinate[] locations

The locations to route along.

System.Single turnPenalty

The turn penalty, if any.

Tuple<System.Nullable<System.Boolean>, System.Nullable<System.Boolean>>[] preferredTurns

The perferred turns. First value for each point is the arrival direction, second value the departure direction.

CancellationToken cancellationToken

The cancellation token, if any.

Returns
Route

A route along all the given locations.

Calculate(RouterBase, IProfileInstance, IMassResolvingAlgorithm, Single, Nullable<Single>[], CancellationToken)

Calculates a route along the given locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, IMassResolvingAlgorithm resolvingAlgorithm, float turnPenalty = 0F, float ? [] preferredDirections = null, CancellationToken cancellationToken = null)
Parameters
RouterBase router

The router.

IProfileInstance profile

The profile.

IMassResolvingAlgorithm resolvingAlgorithm

The resolving algorithm containing the location to route along.

System.Single turnPenalty

The turn penalty, if any.

System.Nullable<System.Single>[] preferredDirections

The perferred directions in degrees.

CancellationToken cancellationToken

The cancellation token, if any.

Returns
Route

A route along all the given locations.

Calculate(RouterBase, IProfileInstance, IMassResolvingAlgorithm, Single, Tuple<Nullable<Boolean>, Nullable<Boolean>>[], CancellationToken)

Calculates a route along the given locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, IMassResolvingAlgorithm resolvingAlgorithm, float turnPenalty = 0F, Tuple<bool ? , bool ? >[] preferredTurns = null, CancellationToken cancellationToken = null)
Parameters
RouterBase router

The router.

IProfileInstance profile

The profile.

IMassResolvingAlgorithm resolvingAlgorithm

The resolving algorithm containing the location to route along.

System.Single turnPenalty

The turn penalty, if any.

Tuple<System.Nullable<System.Boolean>, System.Nullable<System.Boolean>>[] preferredTurns

The perferred turns. First value for each point is the arrival direction, second value the departure direction.

CancellationToken cancellationToken

The cancellation token, if any.

Returns
Route

A route along all the given locations.

Calculate(RouterBase, IProfileInstance, RouterPoint, RouterPoint)

Calculates a route between the two locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, RouterPoint source, RouterPoint target)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint source

RouterPoint target

Returns
Route

Calculate(RouterBase, IProfileInstance, RouterPoint, RouterPoint, CancellationToken)

Calculates a route between the two locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, RouterPoint source, RouterPoint target, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint source

RouterPoint target

CancellationToken cancellationToken

Returns
Route

Calculate(RouterBase, IProfileInstance, RouterPoint, RouterPoint[])

Calculates all routes between all sources and all targets.

Declaration
public static Route[] Calculate(this RouterBase router, IProfileInstance profile, RouterPoint source, RouterPoint[] targets)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint source

RouterPoint[] targets

Returns
Route[]

Calculate(RouterBase, IProfileInstance, RouterPoint, RouterPoint[], CancellationToken)

Calculates all routes between all sources and all targets.

Declaration
public static Route[] Calculate(this RouterBase router, IProfileInstance profile, RouterPoint source, RouterPoint[] targets, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint source

RouterPoint[] targets

CancellationToken cancellationToken

Returns
Route[]

Calculate(RouterBase, IProfileInstance, RouterPoint, Nullable<Single>, RouterPoint, Nullable<Single>)

Calculates a route along the given locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, RouterPoint source, float ? sourceDirection, RouterPoint target, float ? targetDirection)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint source

System.Nullable<System.Single> sourceDirection

RouterPoint target

System.Nullable<System.Single> targetDirection

Returns
Route

Calculate(RouterBase, IProfileInstance, RouterPoint, Nullable<Single>, RouterPoint, Nullable<Single>, CancellationToken)

Calculates a route along the given locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, RouterPoint source, float ? sourceDirection, RouterPoint target, float ? targetDirection, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint source

System.Nullable<System.Single> sourceDirection

RouterPoint target

System.Nullable<System.Single> targetDirection

CancellationToken cancellationToken

Returns
Route

Calculate(RouterBase, IProfileInstance, RouterPoint[])

Calculates a route along the given locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, RouterPoint[] locations)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint[] locations

Returns
Route

Calculate(RouterBase, IProfileInstance, RouterPoint[], CancellationToken)

Calculates a route along the given locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, RouterPoint[] locations, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint[] locations

CancellationToken cancellationToken

Returns
Route

Calculate(RouterBase, IProfileInstance, RouterPoint[], RouterPoint[])

Calculates all routes between all sources and all targets.

Declaration
public static Route[][] Calculate(this RouterBase router, IProfileInstance profile, RouterPoint[] sources, RouterPoint[] targets)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint[] sources

RouterPoint[] targets

Returns
Route[][]

Calculate(RouterBase, IProfileInstance, RouterPoint[], RouterPoint[], CancellationToken)

Calculates all routes between all sources and all targets.

Declaration
public static Route[][] Calculate(this RouterBase router, IProfileInstance profile, RouterPoint[] sources, RouterPoint[] targets, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint[] sources

RouterPoint[] targets

CancellationToken cancellationToken

Returns
Route[][]

Calculate(RouterBase, IProfileInstance, RouterPoint[], Single, Nullable<Single>[], CancellationToken)

Calculates a route along the given locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, RouterPoint[] locations, float turnPenalty = 0F, float ? [] preferredDirections = null, CancellationToken cancellationToken = null)
Parameters
RouterBase router

The router.

IProfileInstance profile

The profile.

RouterPoint[] locations

The locations to route along.

System.Single turnPenalty

The turn penalty, if any.

System.Nullable<System.Single>[] preferredDirections

The perferred directions in degrees.

CancellationToken cancellationToken

The cancellation token, if any.

Returns
Route

A route along all the given locations.

Calculate(RouterBase, IProfileInstance, RouterPoint[], Single, Tuple<Nullable<Boolean>, Nullable<Boolean>>[], CancellationToken)

Calculates a route along the given locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, RouterPoint[] locations, float turnPenalty = 0F, Tuple<bool ? , bool ? >[] preferredTurns = null, CancellationToken cancellationToken = null)
Parameters
RouterBase router

The router.

IProfileInstance profile

The profile.

RouterPoint[] locations

The locations to route along.

System.Single turnPenalty

The turn penalty, if any.

Tuple<System.Nullable<System.Boolean>, System.Nullable<System.Boolean>>[] preferredTurns

The perferred turns. First value for each point is the arrival direction, second value the departure direction.

CancellationToken cancellationToken

The cancellation token, if any.

Returns
Route

A route along all the given locations.

Calculate(RouterBase, IProfileInstance, Single, Single, Single, Single)

Calculates a route between the two locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, float sourceLatitude, float sourceLongitude, float targetLatitude, float targetLongitude)
Parameters
RouterBase router

IProfileInstance profile

System.Single sourceLatitude

System.Single sourceLongitude

System.Single targetLatitude

System.Single targetLongitude

Returns
Route

Calculate(RouterBase, IProfileInstance, Single, Single, Single, Single, CancellationToken)

Calculates a route between the two locations.

Declaration
public static Route Calculate(this RouterBase router, IProfileInstance profile, float sourceLatitude, float sourceLongitude, float targetLatitude, float targetLongitude, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

System.Single sourceLatitude

System.Single sourceLongitude

System.Single targetLatitude

System.Single targetLongitude

CancellationToken cancellationToken

Returns
Route

CalculateWeight(RouterBase, IProfileInstance, RouterPoint[], ISet<Int32>)

Calculates all weights between all locations.

Declaration
public static float[][] CalculateWeight(this RouterBase router, IProfileInstance profile, RouterPoint[] locations, ISet<int> invalids)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint[] locations

ISet<System.Int32> invalids

Returns
System.Single[][]

CalculateWeight(RouterBase, IProfileInstance, RouterPoint[], ISet<Int32>, CancellationToken)

Calculates all weights between all locations.

Declaration
public static float[][] CalculateWeight(this RouterBase router, IProfileInstance profile, RouterPoint[] locations, ISet<int> invalids, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint[] locations

ISet<System.Int32> invalids

CancellationToken cancellationToken

Returns
System.Single[][]

CalculateWeight<T>(RouterBase, IProfileInstance, WeightHandler<T>, RouterPoint[], ISet<Int32>)

Calculates all weights between all locations.

Declaration
public static T[][] CalculateWeight<T>(this RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint[] locations, ISet<int> invalids)where T : struct
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

RouterPoint[] locations

ISet<System.Int32> invalids

Returns
T[][]

Type Parameters
T

CalculateWeight<T>(RouterBase, IProfileInstance, WeightHandler<T>, RouterPoint[], ISet<Int32>, CancellationToken)

Calculates all weights between all locations.

Declaration
public static T[][] CalculateWeight<T>(this RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint[] locations, ISet<int> invalids, CancellationToken cancellationToken)where T : struct
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

RouterPoint[] locations

ISet<System.Int32> invalids

CancellationToken cancellationToken

Returns
T[][]

Type Parameters
T

CheckConnectivity(RouterBase, IProfileInstance, RouterPoint)

Checks if the given point is connected to the rest of the network. Use this to detect points on routing islands.

Declaration
public static bool CheckConnectivity(this RouterBase router, IProfileInstance profile, RouterPoint point)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint point

Returns
System.Boolean

CheckConnectivity(RouterBase, IProfileInstance, RouterPoint, CancellationToken)

Checks if the given point is connected to the rest of the network. Use this to detect points on routing islands.

Declaration
public static bool CheckConnectivity(this RouterBase router, IProfileInstance profile, RouterPoint point, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint point

CancellationToken cancellationToken

Returns
System.Boolean

CheckConnectivity(RouterBase, IProfileInstance, RouterPoint, Single)

Checks if the given point is connected to the rest of the network. Use this to detect points on routing islands.

Declaration
public static bool CheckConnectivity(this RouterBase router, IProfileInstance profile, RouterPoint point, float radiusInMeters)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint point

System.Single radiusInMeters

Returns
System.Boolean

CheckConnectivity(RouterBase, IProfileInstance, RouterPoint, Single, CancellationToken)

Checks if the given point is connected to the rest of the network. Use this to detect points on routing islands.

Declaration
public static bool CheckConnectivity(this RouterBase router, IProfileInstance profile, RouterPoint point, float radiusInMeters, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint point

System.Single radiusInMeters

CancellationToken cancellationToken

Returns
System.Boolean

GetAugmentedGetFactor(RouterBase, IProfileInstance)

Gets the augmented get factor for the given profile but used the cached version whenever available.

Declaration
public static Func<ushort, FactorAndSpeed> GetAugmentedGetFactor(this RouterBase router, IProfileInstance profileInstance)
Parameters
RouterBase router

IProfileInstance profileInstance

Returns
Func<System.UInt16, FactorAndSpeed>

GetAugmentedWeightHandler(RouterBase, IProfileInstance)

Gets the default weight handler for the given profile.

Declaration
public static WeightHandler GetAugmentedWeightHandler(this RouterBase router, IProfileInstance profileInstance)
Parameters
RouterBase router

IProfileInstance profileInstance

Returns
WeightHandler

GetDefaultGetFactor(RouterBase, IProfileInstance)

Gets the default get factor for the given profile instance but used the cached version whenever available.

Declaration
public static Func<ushort, Factor> GetDefaultGetFactor(this RouterBase router, IProfileInstance profileInstance)
Parameters
RouterBase router

IProfileInstance profileInstance

Returns
Func<System.UInt16, Factor>

GetDefaultWeightHandler(RouterBase, IProfileInstance)

Gets the default weight handler for the given profile instance.

Declaration
public static DefaultWeightHandler GetDefaultWeightHandler(this RouterBase router, IProfileInstance profileInstance)
Parameters
RouterBase router

IProfileInstance profileInstance

Returns
DefaultWeightHandler

GetIsAcceptable(RouterBase, IProfileInstance[])

Returns the IsAcceptable function to use in the default resolver algorithm.

Declaration
public static Func<GeometricEdge, bool> GetIsAcceptable(this RouterBase router, params IProfileInstance[] profiles)
Parameters
RouterBase router

IProfileInstance[] profiles

Returns
Func<GeometricEdge, System.Boolean>

Resolve(RouterBase, IProfileInstance, Coordinate, Single)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static RouterPoint Resolve(this RouterBase router, IProfileInstance profile, Coordinate coordinate, float searchDistanceInMeter = 50F)
Parameters
RouterBase router

IProfileInstance profile

Coordinate coordinate

System.Single searchDistanceInMeter

Returns
RouterPoint

Resolve(RouterBase, IProfileInstance, Coordinate, Single, CancellationToken)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static RouterPoint Resolve(this RouterBase router, IProfileInstance profile, Coordinate coordinate, float searchDistanceInMeter, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

Coordinate coordinate

System.Single searchDistanceInMeter

CancellationToken cancellationToken

Returns
RouterPoint

Resolve(RouterBase, IProfileInstance, Coordinate[], Single)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static RouterPoint[] Resolve(this RouterBase router, IProfileInstance profile, Coordinate[] coordinates, float searchDistanceInMeter = 50F)
Parameters
RouterBase router

IProfileInstance profile

Coordinate[] coordinates

System.Single searchDistanceInMeter

Returns
RouterPoint[]

Resolve(RouterBase, IProfileInstance, Coordinate[], Single, CancellationToken)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static RouterPoint[] Resolve(this RouterBase router, IProfileInstance profile, Coordinate[] coordinates, float searchDistanceInMeter, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

Coordinate[] coordinates

System.Single searchDistanceInMeter

CancellationToken cancellationToken

Returns
RouterPoint[]

Resolve(RouterBase, IProfileInstance, Single, Single, Single)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static RouterPoint Resolve(this RouterBase router, IProfileInstance profile, float latitude, float longitude, float searchDistanceInMeter = 50F)
Parameters
RouterBase router

IProfileInstance profile

System.Single latitude

System.Single longitude

System.Single searchDistanceInMeter

Returns
RouterPoint

Resolve(RouterBase, IProfileInstance, Single, Single, Single, CancellationToken)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static RouterPoint Resolve(this RouterBase router, IProfileInstance profile, float latitude, float longitude, float searchDistanceInMeter, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

System.Single latitude

System.Single longitude

System.Single searchDistanceInMeter

CancellationToken cancellationToken

Returns
RouterPoint

Resolve(RouterBase, IProfileInstance[], Coordinate, Func<RoutingEdge, Boolean>, Single)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static RouterPoint Resolve(this RouterBase router, IProfileInstance[] profiles, Coordinate coordinate, Func<RoutingEdge, bool> isBetter, float searchDistanceInMeter = 50F)
Parameters
RouterBase router

IProfileInstance[] profiles

Coordinate coordinate

Func<RoutingEdge, System.Boolean> isBetter

System.Single searchDistanceInMeter

Returns
RouterPoint

Resolve(RouterBase, IProfileInstance[], Coordinate, Func<RoutingEdge, Boolean>, Single, CancellationToken)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static RouterPoint Resolve(this RouterBase router, IProfileInstance[] profiles, Coordinate coordinate, Func<RoutingEdge, bool> isBetter, float searchDistanceInMeter, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance[] profiles

Coordinate coordinate

Func<RoutingEdge, System.Boolean> isBetter

System.Single searchDistanceInMeter

CancellationToken cancellationToken

Returns
RouterPoint

Resolve(RouterBase, IProfileInstance[], Coordinate, Single)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static RouterPoint Resolve(this RouterBase router, IProfileInstance[] profiles, Coordinate coordinate, float searchDistanceInMeter = 50F)
Parameters
RouterBase router

IProfileInstance[] profiles

Coordinate coordinate

System.Single searchDistanceInMeter

Returns
RouterPoint

Resolve(RouterBase, IProfileInstance[], Coordinate, Single, CancellationToken)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static RouterPoint Resolve(this RouterBase router, IProfileInstance[] profiles, Coordinate coordinate, float searchDistanceInMeter, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance[] profiles

Coordinate coordinate

System.Single searchDistanceInMeter

CancellationToken cancellationToken

Returns
RouterPoint

Resolve(RouterBase, IProfileInstance[], Single, Single, Func<RoutingEdge, Boolean>, Single)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static RouterPoint Resolve(this RouterBase router, IProfileInstance[] profiles, float latitude, float longitude, Func<RoutingEdge, bool> isBetter, float searchDistanceInMeter = 50F)
Parameters
RouterBase router

IProfileInstance[] profiles

System.Single latitude

System.Single longitude

Func<RoutingEdge, System.Boolean> isBetter

System.Single searchDistanceInMeter

Returns
RouterPoint

Resolve(RouterBase, IProfileInstance[], Single, Single, Func<RoutingEdge, Boolean>, Single, CancellationToken)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static RouterPoint Resolve(this RouterBase router, IProfileInstance[] profiles, float latitude, float longitude, Func<RoutingEdge, bool> isBetter, float searchDistanceInMeter, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance[] profiles

System.Single latitude

System.Single longitude

Func<RoutingEdge, System.Boolean> isBetter

System.Single searchDistanceInMeter

CancellationToken cancellationToken

Returns
RouterPoint

Resolve(RouterBase, IProfileInstance[], Single, Single, Single)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static RouterPoint Resolve(this RouterBase router, IProfileInstance[] profiles, float latitude, float longitude, float searchDistanceInMeter = 50F)
Parameters
RouterBase router

IProfileInstance[] profiles

System.Single latitude

System.Single longitude

System.Single searchDistanceInMeter

Returns
RouterPoint

Resolve(RouterBase, IProfileInstance[], Single, Single, Single, CancellationToken)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static RouterPoint Resolve(this RouterBase router, IProfileInstance[] profiles, float latitude, float longitude, float searchDistanceInMeter, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance[] profiles

System.Single latitude

System.Single longitude

System.Single searchDistanceInMeter

CancellationToken cancellationToken

Returns
RouterPoint

ResolveConnected(RouterBase, IProfileInstance, Single, Single, Single, Single)

Resolves a location but also checks if it's connected to the rest of the network.

Declaration
public static RouterPoint ResolveConnected(this RouterBase router, IProfileInstance profileInstance, float latitude, float longitude, float radiusInMeter = 1000F, float maxSearchDistance = 50F)
Parameters
RouterBase router

IProfileInstance profileInstance

System.Single latitude

System.Single longitude

System.Single radiusInMeter

System.Single maxSearchDistance

Returns
RouterPoint

ResolveConnected(RouterBase, IProfileInstance, Single, Single, Single, Single, CancellationToken)

Resolves a location but also checks if it's connected to the rest of the network.

Declaration
public static RouterPoint ResolveConnected(this RouterBase router, IProfileInstance profileInstance, float latitude, float longitude, float radiusInMeter, float maxSearchDistance, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profileInstance

System.Single latitude

System.Single longitude

System.Single radiusInMeter

System.Single maxSearchDistance

CancellationToken cancellationToken

Returns
RouterPoint

SupportsAll(RouterBase, IProfileInstance[])

Returns true if all given profiles are supported.

Declaration
public static bool SupportsAll(this RouterBase router, params IProfileInstance[] profiles)
Parameters
RouterBase router

IProfileInstance[] profiles

Returns
System.Boolean

TryCalculate(RouterBase, IProfileInstance, Coordinate, Coordinate)

Calculates a route between the two locations.

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profile, Coordinate source, Coordinate target)
Parameters
RouterBase router

IProfileInstance profile

Coordinate source

Coordinate target

Returns
Result<Route>

TryCalculate(RouterBase, IProfileInstance, Coordinate, Coordinate, CancellationToken)

Calculates a route between the two locations.

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profile, Coordinate source, Coordinate target, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

Coordinate source

Coordinate target

CancellationToken cancellationToken

Returns
Result<Route>

TryCalculate(RouterBase, IProfileInstance, Coordinate[], CancellationToken)

Calculates a route along the given locations.

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profile, Coordinate[] locations, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

Coordinate[] locations

CancellationToken cancellationToken

Returns
Result<Route>

TryCalculate(RouterBase, IProfileInstance, Coordinate[], Single, Nullable<Single>[], CancellationToken)

Calculates a route along the given locations.

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profile, Coordinate[] locations, float turnPenalty = 0F, float ? [] preferredDirections = null, CancellationToken cancellationToken = null)
Parameters
RouterBase router

The router.

IProfileInstance profile

The profile.

Coordinate[] locations

The locations to route along.

System.Single turnPenalty

The turn penalty, if any.

System.Nullable<System.Single>[] preferredDirections

The perferred directions in degrees.

CancellationToken cancellationToken

The cancellation token, if any.

Returns
Result<Route>

A route along all the given locations.

TryCalculate(RouterBase, IProfileInstance, Coordinate[], Single, Tuple<Nullable<Boolean>, Nullable<Boolean>>[], CancellationToken)

Calculates a route along the given locations.

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profile, Coordinate[] locations, float turnPenalty = 0F, Tuple<bool ? , bool ? >[] preferredTurns = null, CancellationToken cancellationToken = null)
Parameters
RouterBase router

The router.

IProfileInstance profile

The profile.

Coordinate[] locations

The locations to route along.

System.Single turnPenalty

The turn penalty, if any.

Tuple<System.Nullable<System.Boolean>, System.Nullable<System.Boolean>>[] preferredTurns

The perferred turns. First value for each point is the arrival direction, second value the departure direction.

CancellationToken cancellationToken

The cancellation token, if any.

Returns
Result<Route>

A route along all the given locations.

TryCalculate(RouterBase, IProfileInstance, IMassResolvingAlgorithm, Single, Nullable<Single>[], CancellationToken)

Calculates a route along the given locations.

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profile, IMassResolvingAlgorithm resolvingAlgorithm, float turnPenalty = 0F, float ? [] preferredDirections = null, CancellationToken cancellationToken = null)
Parameters
RouterBase router

The router.

IProfileInstance profile

The profile.

IMassResolvingAlgorithm resolvingAlgorithm

The resolving algorithm containing the location to route along.

System.Single turnPenalty

The turn penalty, if any.

System.Nullable<System.Single>[] preferredDirections

The perferred directions in degrees.

CancellationToken cancellationToken

The cancellation token, if any.

Returns
Result<Route>

A route along all the given locations.

TryCalculate(RouterBase, IProfileInstance, IMassResolvingAlgorithm, Single, Tuple<Nullable<Boolean>, Nullable<Boolean>>[], CancellationToken)

Calculates a route along the given locations.

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profile, IMassResolvingAlgorithm resolvingAlgorithm, float turnPenalty = 0F, Tuple<bool ? , bool ? >[] preferredTurns = null, CancellationToken cancellationToken = null)
Parameters
RouterBase router

The router.

IProfileInstance profile

The profile.

IMassResolvingAlgorithm resolvingAlgorithm

The resolving algorithm containing the location to route along.

System.Single turnPenalty

The turn penalty, if any.

Tuple<System.Nullable<System.Boolean>, System.Nullable<System.Boolean>>[] preferredTurns

The perferred turns. First value for each point is the arrival direction, second value the departure direction.

CancellationToken cancellationToken

The cancellation token, if any.

Returns
Result<Route>

A route along all the given locations.

TryCalculate(RouterBase, IProfileInstance, RouterPoint, RouterPoint)

Calculates a route the given locations;

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profile, RouterPoint source, RouterPoint target)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint source

RouterPoint target

Returns
Result<Route>

TryCalculate(RouterBase, IProfileInstance, RouterPoint, RouterPoint, CancellationToken)

Calculates a route the given locations;

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profile, RouterPoint source, RouterPoint target, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint source

RouterPoint target

CancellationToken cancellationToken

Returns
Result<Route>

TryCalculate(RouterBase, IProfileInstance, RouterPoint, RouterPoint[])

Calculates all routes between all sources and all targets.

Declaration
public static Result<Route[]> TryCalculate(this RouterBase router, IProfileInstance profile, RouterPoint source, RouterPoint[] targets)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint source

RouterPoint[] targets

Returns
Result<Route[]>

TryCalculate(RouterBase, IProfileInstance, RouterPoint, RouterPoint[], CancellationToken)

Calculates all routes between all sources and all targets.

Declaration
public static Result<Route[]> TryCalculate(this RouterBase router, IProfileInstance profile, RouterPoint source, RouterPoint[] targets, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint source

RouterPoint[] targets

CancellationToken cancellationToken

Returns
Result<Route[]>

TryCalculate(RouterBase, IProfileInstance, RouterPoint, Boolean, RouterPoint, Boolean, RoutingSettings<Single>)

Calculates a route between the two given router points but in a fixed direction.

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profileInstance, RouterPoint source, bool sourceForward, RouterPoint target, bool targetForward, RoutingSettings<float> settings = null)
Parameters
RouterBase router

IProfileInstance profileInstance

RouterPoint source

System.Boolean sourceForward

RouterPoint target

System.Boolean targetForward

RoutingSettings<System.Single> settings

Returns
Result<Route>

TryCalculate(RouterBase, IProfileInstance, RouterPoint, Nullable<Boolean>, RouterPoint, Nullable<Boolean>, RoutingSettings<Single>)

Calculates a route between the two given router points but in a fixed direction.

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profileInstance, RouterPoint source, bool ? sourceForward, RouterPoint target, bool ? targetForward, RoutingSettings<float> settings = null)
Parameters
RouterBase router

IProfileInstance profileInstance

RouterPoint source

System.Nullable<System.Boolean> sourceForward

RouterPoint target

System.Nullable<System.Boolean> targetForward

RoutingSettings<System.Single> settings

Returns
Result<Route>

TryCalculate(RouterBase, IProfileInstance, RouterPoint, Nullable<Single>, RouterPoint, Nullable<Single>, Single, RoutingSettings<Single>)

Tries to calculate a route using the given directions as guidance.

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profileInstance, RouterPoint source, float ? sourceDirection, RouterPoint target, float ? targetDirection, float diffLimit = 45F, RoutingSettings<float> settings = null)
Parameters
RouterBase router

The router.

IProfileInstance profileInstance

RouterPoint source

The source location.

System.Nullable<System.Single> sourceDirection

The direction to go in at the source location, an angle in degrees relative to north, null if don't care.

RouterPoint target

The target location.

System.Nullable<System.Single> targetDirection

The direction to arrive on at the target location, an angle in degrees relative to north, null if don't care.

System.Single diffLimit

The diff limit when the angle is smaller than this we consider it the same direction.

RoutingSettings<System.Single> settings

Returns
Result<Route>

TryCalculate(RouterBase, IProfileInstance, RouterPoint[])

Calculates a route along the given locations.

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profile, RouterPoint[] locations)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint[] locations

Returns
Result<Route>

TryCalculate(RouterBase, IProfileInstance, RouterPoint[], CancellationToken)

Calculates a route along the given locations.

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profile, RouterPoint[] locations, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint[] locations

CancellationToken cancellationToken

Returns
Result<Route>

TryCalculate(RouterBase, IProfileInstance, RouterPoint[], RouterPoint[])

Calculates all routes between all sources and all targets.

Declaration
public static Result<Route[][]> TryCalculate(this RouterBase router, IProfileInstance profile, RouterPoint[] sources, RouterPoint[] targets)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint[] sources

RouterPoint[] targets

Returns
Result<Route[][]>

TryCalculate(RouterBase, IProfileInstance, RouterPoint[], RouterPoint[], CancellationToken)

Calculates all routes between all sources and all targets.

Declaration
public static Result<Route[][]> TryCalculate(this RouterBase router, IProfileInstance profile, RouterPoint[] sources, RouterPoint[] targets, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

RouterPoint[] sources

RouterPoint[] targets

CancellationToken cancellationToken

Returns
Result<Route[][]>

TryCalculate(RouterBase, IProfileInstance, RouterPoint[], Single, Nullable<Single>[], CancellationToken)

Calculates a route along the given locations.

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profile, RouterPoint[] locations, float turnPenalty, float ? [] preferredDirections, CancellationToken cancellationToken = null)
Parameters
RouterBase router

The router.

IProfileInstance profile

The profile.

RouterPoint[] locations

The locations to route along.

System.Single turnPenalty

The turn penalty, if any.

System.Nullable<System.Single>[] preferredDirections

The perferred directions in degrees.

CancellationToken cancellationToken

The cancellation token, if any.

Returns
Result<Route>

A route along all the given locations.

TryCalculate(RouterBase, IProfileInstance, RouterPoint[], Single, Tuple<Nullable<Boolean>, Nullable<Boolean>>[], CancellationToken)

Calculates a route along the given locations.

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profile, RouterPoint[] locations, float turnPenalty, Tuple<bool ? , bool ? >[] preferredTurns = null, CancellationToken cancellationToken = null)
Parameters
RouterBase router

The router.

IProfileInstance profile

The profile.

RouterPoint[] locations

The locations to route along.

System.Single turnPenalty

The turn penalty, if any.

Tuple<System.Nullable<System.Boolean>, System.Nullable<System.Boolean>>[] preferredTurns

The perferred turns. First value for each point is the arrival direction, second value the departure direction.

CancellationToken cancellationToken

The cancellation token, if any.

Returns
Result<Route>

A route along all the given locations.

TryCalculate(RouterBase, IProfileInstance, Single, Single, Single, Single)

Calculates a route between the two locations.

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profile, float sourceLatitude, float sourceLongitude, float targetLatitude, float targetLongitude)
Parameters
RouterBase router

IProfileInstance profile

System.Single sourceLatitude

System.Single sourceLongitude

System.Single targetLatitude

System.Single targetLongitude

Returns
Result<Route>

TryCalculate(RouterBase, IProfileInstance, Single, Single, Single, Single, CancellationToken)

Calculates a route between the two locations.

Declaration
public static Result<Route> TryCalculate(this RouterBase router, IProfileInstance profile, float sourceLatitude, float sourceLongitude, float targetLatitude, float targetLongitude, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

System.Single sourceLatitude

System.Single sourceLongitude

System.Single targetLatitude

System.Single targetLongitude

CancellationToken cancellationToken

Returns
Result<Route>

TryCalculate<T>(RouterBase, IProfileInstance, WeightHandler<T>, RouterPoint, RouterPoint, RoutingSettings<T>)

Calculates a route the given locations;

Declaration
public static Result<Route> TryCalculate<T>(this RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint source, RouterPoint target, RoutingSettings<T> settings = null)where T : struct
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

RouterPoint source

RouterPoint target

RoutingSettings<T> settings

Returns
Result<Route>

Type Parameters
T

TryCalculate<T>(RouterBase, IProfileInstance, WeightHandler<T>, RouterPoint, RouterPoint, RoutingSettings<T>, CancellationToken)

Calculates a route the given locations;

Declaration
public static Result<Route> TryCalculate<T>(this RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint source, RouterPoint target, RoutingSettings<T> settings, CancellationToken cancellationToken)where T : struct
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

RouterPoint source

RouterPoint target

RoutingSettings<T> settings

CancellationToken cancellationToken

Returns
Result<Route>

Type Parameters
T

TryCalculate<T>(RouterBase, IProfileInstance, WeightHandler<T>, RouterPoint, Boolean, RouterPoint, Boolean, RoutingSettings<T>)

Calculates a route between the two given router points but in a fixed direction.

Declaration
public static Result<Route> TryCalculate<T>(this RouterBase router, IProfileInstance profileInstance, WeightHandler<T> weightHandler, RouterPoint source, bool sourceForward, RouterPoint target, bool targetForward, RoutingSettings<T> settings = null)where T : struct
Parameters
RouterBase router

IProfileInstance profileInstance

WeightHandler<T> weightHandler

RouterPoint source

System.Boolean sourceForward

RouterPoint target

System.Boolean targetForward

RoutingSettings<T> settings

Returns
Result<Route>

Type Parameters
T

TryCalculate<T>(RouterBase, IProfileInstance, WeightHandler<T>, RouterPoint, Nullable<Boolean>, RouterPoint, Nullable<Boolean>, RoutingSettings<T>)

Calculates a route between the two given router points but in a fixed direction.

Declaration
public static Result<Route> TryCalculate<T>(this RouterBase router, IProfileInstance profileInstance, WeightHandler<T> weightHandler, RouterPoint source, bool ? sourceForward, RouterPoint target, bool ? targetForward, RoutingSettings<T> settings = null)where T : struct
Parameters
RouterBase router

IProfileInstance profileInstance

WeightHandler<T> weightHandler

RouterPoint source

System.Nullable<System.Boolean> sourceForward

RouterPoint target

System.Nullable<System.Boolean> targetForward

RoutingSettings<T> settings

Returns
Result<Route>

Type Parameters
T

TryCalculate<T>(RouterBase, IProfileInstance, WeightHandler<T>, RouterPoint, Nullable<Boolean>, RouterPoint, Nullable<Boolean>, RoutingSettings<T>, CancellationToken)

Calculates a route between the two given router points but in a fixed direction.

Declaration
public static Result<Route> TryCalculate<T>(this RouterBase router, IProfileInstance profileInstance, WeightHandler<T> weightHandler, RouterPoint source, bool ? sourceForward, RouterPoint target, bool ? targetForward, RoutingSettings<T> settings, CancellationToken cancellationToken)where T : struct
Parameters
RouterBase router

IProfileInstance profileInstance

WeightHandler<T> weightHandler

RouterPoint source

System.Nullable<System.Boolean> sourceForward

RouterPoint target

System.Nullable<System.Boolean> targetForward

RoutingSettings<T> settings

CancellationToken cancellationToken

Returns
Result<Route>

Type Parameters
T

TryCalculate<T>(RouterBase, IProfileInstance, WeightHandler<T>, RouterPoint, Nullable<Single>, RouterPoint, Nullable<Single>, Single, RoutingSettings<T>)

Tries to calculate a route using the given directions as guidance.

Declaration
public static Result<Route> TryCalculate<T>(this RouterBase router, IProfileInstance profileInstance, WeightHandler<T> weightHandler, RouterPoint source, float ? sourceDirection, RouterPoint target, float ? targetDirection, float diffLimit = 45F, RoutingSettings<T> settings = null)where T : struct
Parameters
RouterBase router

The router.

IProfileInstance profileInstance

WeightHandler<T> weightHandler

RouterPoint source

The source location.

System.Nullable<System.Single> sourceDirection

The direction to go in at the source location, an angle in degrees relative to north, null if don't care.

RouterPoint target

The target location.

System.Nullable<System.Single> targetDirection

The direction to arrive on at the target location, an angle in degrees relative to north, null if don't care.

System.Single diffLimit

The diff limit when the angle is smaller than this we consider it the same direction.

RoutingSettings<T> settings

Returns
Result<Route>

Type Parameters
T

TryCalculate<T>(RouterBase, IProfileInstance, WeightHandler<T>, RouterPoint, Nullable<Single>, RouterPoint, Nullable<Single>, Single, RoutingSettings<T>, CancellationToken)

Tries to calculate a route using the given directions as guidance.

Declaration
public static Result<Route> TryCalculate<T>(this RouterBase router, IProfileInstance profileInstance, WeightHandler<T> weightHandler, RouterPoint source, float ? sourceDirection, RouterPoint target, float ? targetDirection, float diffLimit, RoutingSettings<T> settings, CancellationToken cancellationToken)where T : struct
Parameters
RouterBase router

The router.

IProfileInstance profileInstance

WeightHandler<T> weightHandler

RouterPoint source

The source location.

System.Nullable<System.Single> sourceDirection

The direction to go in at the source location, an angle in degrees relative to north, null if don't care.

RouterPoint target

The target location.

System.Nullable<System.Single> targetDirection

The direction to arrive on at the target location, an angle in degrees relative to north, null if don't care.

System.Single diffLimit

The diff limit when the angle is smaller than this we consider it the same direction.

RoutingSettings<T> settings

CancellationToken cancellationToken

Returns
Result<Route>

Type Parameters
T

TryCalculateRaw<T>(RouterBase, IProfileInstance, WeightHandler<T>, DirectedEdgeId, DirectedEdgeId, RoutingSettings<T>)

Calculates a route between the two given directed edges.

Declaration
public static Result<EdgePath<T>> TryCalculateRaw<T>(this RouterBase router, IProfileInstance profileInstance, WeightHandler<T> weightHandler, DirectedEdgeId source, DirectedEdgeId target, RoutingSettings<T> settings = null)where T : struct
Parameters
RouterBase router

IProfileInstance profileInstance

WeightHandler<T> weightHandler

DirectedEdgeId source

DirectedEdgeId target

RoutingSettings<T> settings

Returns
Result<EdgePath<T>>

Type Parameters
T

TryCalculateRaw<T>(RouterBase, IProfileInstance, WeightHandler<T>, DirectedEdgeId, DirectedEdgeId, RoutingSettings<T>, CancellationToken)

Calculates a route between the two given directed edges.

Declaration
public static Result<EdgePath<T>> TryCalculateRaw<T>(this RouterBase router, IProfileInstance profileInstance, WeightHandler<T> weightHandler, DirectedEdgeId source, DirectedEdgeId target, RoutingSettings<T> settings, CancellationToken cancellationToken)where T : struct
Parameters
RouterBase router

IProfileInstance profileInstance

WeightHandler<T> weightHandler

DirectedEdgeId source

DirectedEdgeId target

RoutingSettings<T> settings

CancellationToken cancellationToken

Returns
Result<EdgePath<T>>

Type Parameters
T

TryCalculateWeight(RouterBase, IProfileInstance, Coordinate, Coordinate)

Calculates the weight between the two locations.

Declaration
public static Result<float> TryCalculateWeight(this RouterBase router, IProfileInstance profile, Coordinate source, Coordinate target)
Parameters
RouterBase router

IProfileInstance profile

Coordinate source

Coordinate target

Returns
Result<System.Single>

TryCalculateWeight(RouterBase, IProfileInstance, Coordinate, Coordinate, CancellationToken)

Calculates the weight between the two locations.

Declaration
public static Result<float> TryCalculateWeight(this RouterBase router, IProfileInstance profile, Coordinate source, Coordinate target, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

Coordinate source

Coordinate target

CancellationToken cancellationToken

Returns
Result<System.Single>

TryCalculateWeight(RouterBase, IProfileInstance, DirectedEdgeId[], DirectedEdgeId[], RoutingSettings<Single>)

Calculates a weight matrix between directed edges, returning weight exclusing the first and last edge.

Declaration
public static Result<float[][]> TryCalculateWeight(this RouterBase router, IProfileInstance profileInstance, DirectedEdgeId[] sources, DirectedEdgeId[] targets, RoutingSettings<float> settings = null)
Parameters
RouterBase router

IProfileInstance profileInstance

DirectedEdgeId[] sources

DirectedEdgeId[] targets

RoutingSettings<System.Single> settings

Returns
Result<System.Single[][]>

TryCalculateWeight(RouterBase, IProfileInstance, DirectedEdgeId[], DirectedEdgeId[], RoutingSettings<Single>, CancellationToken)

Calculates a weight matrix between directed edges, returning weight exclusing the first and last edge.

Declaration
public static Result<float[][]> TryCalculateWeight(this RouterBase router, IProfileInstance profileInstance, DirectedEdgeId[] sources, DirectedEdgeId[] targets, RoutingSettings<float> settings, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profileInstance

DirectedEdgeId[] sources

DirectedEdgeId[] targets

RoutingSettings<System.Single> settings

CancellationToken cancellationToken

Returns
Result<System.Single[][]>

TryCalculateWeight<T>(RouterBase, IProfileInstance, WeightHandler<T>, Coordinate, Coordinate)

Calculates the weight between the two locations.

Declaration
public static Result<T> TryCalculateWeight<T>(this RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, Coordinate source, Coordinate target)where T : struct
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

Coordinate source

Coordinate target

Returns
Result<T>

Type Parameters
T

TryCalculateWeight<T>(RouterBase, IProfileInstance, WeightHandler<T>, Coordinate, Coordinate, CancellationToken)

Calculates the weight between the two locations.

Declaration
public static Result<T> TryCalculateWeight<T>(this RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, Coordinate source, Coordinate target, CancellationToken cancellationToken)where T : struct
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

Coordinate source

Coordinate target

CancellationToken cancellationToken

Returns
Result<T>

Type Parameters
T

TryCalculateWeight<T>(RouterBase, IProfileInstance, WeightHandler<T>, Coordinate[], Coordinate[])

Calculates all weights between all sources and all targets.

Declaration
public static Result<T[][]> TryCalculateWeight<T>(this RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, Coordinate[] sources, Coordinate[] targets)where T : struct
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

Coordinate[] sources

Coordinate[] targets

Returns
Result<T[][]>

Type Parameters
T

TryCalculateWeight<T>(RouterBase, IProfileInstance, WeightHandler<T>, Coordinate[], Coordinate[], CancellationToken)

Calculates all weights between all sources and all targets.

Declaration
public static Result<T[][]> TryCalculateWeight<T>(this RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, Coordinate[] sources, Coordinate[] targets, CancellationToken cancellationToken)where T : struct
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

Coordinate[] sources

Coordinate[] targets

CancellationToken cancellationToken

Returns
Result<T[][]>

Type Parameters
T

TryCalculateWeight<T>(RouterBase, IProfileInstance, WeightHandler<T>, DirectedEdgeId[], DirectedEdgeId[], RoutingSettings<T>)

Calculates a weight matrix between directed edges, returning weight exclusing the first and last edge.

Declaration
public static Result<T[][]> TryCalculateWeight<T>(this RouterBase router, IProfileInstance profileInstance, WeightHandler<T> weightHandler, DirectedEdgeId[] sources, DirectedEdgeId[] targets, RoutingSettings<T> settings = null)where T : struct
Parameters
RouterBase router

IProfileInstance profileInstance

WeightHandler<T> weightHandler

DirectedEdgeId[] sources

DirectedEdgeId[] targets

RoutingSettings<T> settings

Returns
Result<T[][]>

Type Parameters
T

TryCalculateWeight<T>(RouterBase, IProfileInstance, WeightHandler<T>, DirectedEdgeId[], DirectedEdgeId[], RoutingSettings<T>, CancellationToken)

Calculates a weight matrix between directed edges, returning weight exclusing the first and last edge.

Declaration
public static Result<T[][]> TryCalculateWeight<T>(this RouterBase router, IProfileInstance profileInstance, WeightHandler<T> weightHandler, DirectedEdgeId[] sources, DirectedEdgeId[] targets, RoutingSettings<T> settings, CancellationToken cancellationToken)where T : struct
Parameters
RouterBase router

IProfileInstance profileInstance

WeightHandler<T> weightHandler

DirectedEdgeId[] sources

DirectedEdgeId[] targets

RoutingSettings<T> settings

CancellationToken cancellationToken

Returns
Result<T[][]>

Type Parameters
T

TryCalculateWeight<T>(RouterBase, IProfileInstance, WeightHandler<T>, RouterPoint, RouterPoint)

Tries to calculate the weight between the given source and target.

Declaration
public static Result<T> TryCalculateWeight<T>(this RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint source, RouterPoint target)where T : struct
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

RouterPoint source

RouterPoint target

Returns
Result<T>

Type Parameters
T

TryCalculateWeight<T>(RouterBase, IProfileInstance, WeightHandler<T>, RouterPoint, RouterPoint, CancellationToken)

Tries to calculate the weight between the given source and target.

Declaration
public static Result<T> TryCalculateWeight<T>(this RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint source, RouterPoint target, CancellationToken cancellationToken)where T : struct
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

RouterPoint source

RouterPoint target

CancellationToken cancellationToken

Returns
Result<T>

Type Parameters
T

TryCalculateWeight<T>(RouterBase, IProfileInstance, WeightHandler<T>, RouterPoint[])

Calculates all weights between all locations.

Declaration
public static Result<T[][]> TryCalculateWeight<T>(this RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint[] locations)where T : struct
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

RouterPoint[] locations

Returns
Result<T[][]>

Type Parameters
T

TryCalculateWeight<T>(RouterBase, IProfileInstance, WeightHandler<T>, RouterPoint[], CancellationToken)

Calculates all weights between all locations.

Declaration
public static Result<T[][]> TryCalculateWeight<T>(this RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint[] locations, CancellationToken cancellationToken)where T : struct
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

RouterPoint[] locations

CancellationToken cancellationToken

Returns
Result<T[][]>

Type Parameters
T

TryCalculateWeight<T>(RouterBase, IProfileInstance, WeightHandler<T>, RouterPoint[], ISet<Int32>)

Calculates all weights between all locations.

Declaration
public static Result<T[][]> TryCalculateWeight<T>(this RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint[] locations, ISet<int> invalids)where T : struct
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

RouterPoint[] locations

ISet<System.Int32> invalids

Returns
Result<T[][]>

Type Parameters
T

TryCalculateWeight<T>(RouterBase, IProfileInstance, WeightHandler<T>, RouterPoint[], ISet<Int32>, CancellationToken)

Calculates all weights between all locations.

Declaration
public static Result<T[][]> TryCalculateWeight<T>(this RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint[] locations, ISet<int> invalids, CancellationToken cancellationToken)where T : struct
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

RouterPoint[] locations

ISet<System.Int32> invalids

CancellationToken cancellationToken

Returns
Result<T[][]>

Type Parameters
T

TryCalculateWeight<T>(RouterBase, IProfileInstance, WeightHandler<T>, Single, Single, Single, Single)

Calculates the weight between the two locations.

Declaration
public static Result<T> TryCalculateWeight<T>(this RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, float sourceLatitude, float sourceLongitude, float targetLatitude, float targetLongitude)where T : struct
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

System.Single sourceLatitude

System.Single sourceLongitude

System.Single targetLatitude

System.Single targetLongitude

Returns
Result<T>

Type Parameters
T

TryCalculateWeight<T>(RouterBase, IProfileInstance, WeightHandler<T>, Single, Single, Single, Single, CancellationToken)

Calculates the weight between the two locations.

Declaration
public static Result<T> TryCalculateWeight<T>(this RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, float sourceLatitude, float sourceLongitude, float targetLatitude, float targetLongitude, CancellationToken cancellationToken)where T : struct
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

System.Single sourceLatitude

System.Single sourceLongitude

System.Single targetLatitude

System.Single targetLongitude

CancellationToken cancellationToken

Returns
Result<T>

Type Parameters
T

TryCalculateWeight<T>(RouterBase, WeightHandler<T>, IProfileInstance, Coordinate[])

Calculates all weights between all given locations.

Declaration
public static Result<T[][]> TryCalculateWeight<T>(this RouterBase router, WeightHandler<T> weightHandler, IProfileInstance profile, Coordinate[] locations)where T : struct
Parameters
RouterBase router

WeightHandler<T> weightHandler

IProfileInstance profile

Coordinate[] locations

Returns
Result<T[][]>

Type Parameters
T

TryCalculateWeight<T>(RouterBase, WeightHandler<T>, IProfileInstance, Coordinate[], CancellationToken)

Calculates all weights between all given locations.

Declaration
public static Result<T[][]> TryCalculateWeight<T>(this RouterBase router, WeightHandler<T> weightHandler, IProfileInstance profile, Coordinate[] locations, CancellationToken cancellationToken)where T : struct
Parameters
RouterBase router

WeightHandler<T> weightHandler

IProfileInstance profile

Coordinate[] locations

CancellationToken cancellationToken

Returns
Result<T[][]>

Type Parameters
T

TryResolve(RouterBase, IProfileInstance, Coordinate, Single)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static Result<RouterPoint> TryResolve(this RouterBase router, IProfileInstance profile, Coordinate coordinate, float searchDistanceInMeter = 50F)
Parameters
RouterBase router

IProfileInstance profile

Coordinate coordinate

System.Single searchDistanceInMeter

Returns
Result<RouterPoint>

TryResolve(RouterBase, IProfileInstance, Coordinate, Single, CancellationToken)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static Result<RouterPoint> TryResolve(this RouterBase router, IProfileInstance profile, Coordinate coordinate, float searchDistanceInMeter, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

Coordinate coordinate

System.Single searchDistanceInMeter

CancellationToken cancellationToken

Returns
Result<RouterPoint>

TryResolve(RouterBase, IProfileInstance, Coordinate[], Single)

Searches for the closest points on the routing network that's routable for the given profile(s).

Declaration
public static Result<RouterPoint>[] TryResolve(this RouterBase router, IProfileInstance profile, Coordinate[] coordinates, float searchDistanceInMeter = 50F)
Parameters
RouterBase router

IProfileInstance profile

Coordinate[] coordinates

System.Single searchDistanceInMeter

Returns
Result<RouterPoint>[]

TryResolve(RouterBase, IProfileInstance, Coordinate[], Single, CancellationToken)

Searches for the closest points on the routing network that's routable for the given profile(s).

Declaration
public static Result<RouterPoint>[] TryResolve(this RouterBase router, IProfileInstance profile, Coordinate[] coordinates, float searchDistanceInMeter, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

Coordinate[] coordinates

System.Single searchDistanceInMeter

CancellationToken cancellationToken

Returns
Result<RouterPoint>[]

TryResolve(RouterBase, IProfileInstance, Single, Single, Single)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static Result<RouterPoint> TryResolve(this RouterBase router, IProfileInstance profile, float latitude, float longitude, float searchDistanceInMeter = 50F)
Parameters
RouterBase router

IProfileInstance profile

System.Single latitude

System.Single longitude

System.Single searchDistanceInMeter

Returns
Result<RouterPoint>

TryResolve(RouterBase, IProfileInstance, Single, Single, Single, CancellationToken)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static Result<RouterPoint> TryResolve(this RouterBase router, IProfileInstance profile, float latitude, float longitude, float searchDistanceInMeter, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profile

System.Single latitude

System.Single longitude

System.Single searchDistanceInMeter

CancellationToken cancellationToken

Returns
Result<RouterPoint>

TryResolve(RouterBase, IProfileInstance[], Coordinate, Func<RoutingEdge, Boolean>, Single)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static Result<RouterPoint> TryResolve(this RouterBase router, IProfileInstance[] profiles, Coordinate coordinate, Func<RoutingEdge, bool> isBetter, float searchDistanceInMeter = 50F)
Parameters
RouterBase router

IProfileInstance[] profiles

Coordinate coordinate

Func<RoutingEdge, System.Boolean> isBetter

System.Single searchDistanceInMeter

Returns
Result<RouterPoint>

TryResolve(RouterBase, IProfileInstance[], Coordinate, Func<RoutingEdge, Boolean>, Single, CancellationToken)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static Result<RouterPoint> TryResolve(this RouterBase router, IProfileInstance[] profiles, Coordinate coordinate, Func<RoutingEdge, bool> isBetter, float searchDistanceInMeter, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance[] profiles

Coordinate coordinate

Func<RoutingEdge, System.Boolean> isBetter

System.Single searchDistanceInMeter

CancellationToken cancellationToken

Returns
Result<RouterPoint>

TryResolve(RouterBase, IProfileInstance[], Coordinate, Single)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static Result<RouterPoint> TryResolve(this RouterBase router, IProfileInstance[] profiles, Coordinate coordinate, float searchDistanceInMeter = 50F)
Parameters
RouterBase router

IProfileInstance[] profiles

Coordinate coordinate

System.Single searchDistanceInMeter

Returns
Result<RouterPoint>

TryResolve(RouterBase, IProfileInstance[], Coordinate, Single, CancellationToken)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static Result<RouterPoint> TryResolve(this RouterBase router, IProfileInstance[] profiles, Coordinate coordinate, float searchDistanceInMeter, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance[] profiles

Coordinate coordinate

System.Single searchDistanceInMeter

CancellationToken cancellationToken

Returns
Result<RouterPoint>

TryResolve(RouterBase, IProfileInstance[], Coordinate[], Single)

Searches for the closest points on the routing network that's routable for the given profile(s).

Declaration
public static Result<RouterPoint>[] TryResolve(this RouterBase router, IProfileInstance[] profiles, Coordinate[] coordinates, float searchDistanceInMeter = 50F)
Parameters
RouterBase router

IProfileInstance[] profiles

Coordinate[] coordinates

System.Single searchDistanceInMeter

Returns
Result<RouterPoint>[]

TryResolve(RouterBase, IProfileInstance[], Coordinate[], Single, CancellationToken)

Searches for the closest points on the routing network that's routable for the given profile(s).

Declaration
public static Result<RouterPoint>[] TryResolve(this RouterBase router, IProfileInstance[] profiles, Coordinate[] coordinates, float searchDistanceInMeter, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance[] profiles

Coordinate[] coordinates

System.Single searchDistanceInMeter

CancellationToken cancellationToken

Returns
Result<RouterPoint>[]

TryResolve(RouterBase, IProfileInstance[], Single, Single, Single)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static Result<RouterPoint> TryResolve(this RouterBase router, IProfileInstance[] profiles, float latitude, float longitude, float searchDistanceInMeter = 50F)
Parameters
RouterBase router

IProfileInstance[] profiles

System.Single latitude

System.Single longitude

System.Single searchDistanceInMeter

Returns
Result<RouterPoint>

TryResolve(RouterBase, IProfileInstance[], Single, Single, Single, CancellationToken)

Searches for the closest point on the routing network that's routable for the given profiles.

Declaration
public static Result<RouterPoint> TryResolve(this RouterBase router, IProfileInstance[] profiles, float latitude, float longitude, float searchDistanceInMeter, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance[] profiles

System.Single latitude

System.Single longitude

System.Single searchDistanceInMeter

CancellationToken cancellationToken

Returns
Result<RouterPoint>

TryResolveConnected(RouterBase, IProfileInstance, Coordinate, Single, Single, Nullable<Boolean>)

Resolves a location but also checks if it's connected to the rest of the network.

Declaration
public static Result<RouterPoint> TryResolveConnected(this RouterBase router, IProfileInstance profileInstance, Coordinate location, float radiusInMeter = 2000F, float maxSearchDistance = 50F, bool ? forward = default (bool ? ))
Parameters
RouterBase router

IProfileInstance profileInstance

Coordinate location

System.Single radiusInMeter

System.Single maxSearchDistance

System.Nullable<System.Boolean> forward

Returns
Result<RouterPoint>

TryResolveConnected(RouterBase, IProfileInstance, Coordinate, Single, Single, Nullable<Boolean>, CancellationToken)

Resolves a location but also checks if it's connected to the rest of the network.

Declaration
public static Result<RouterPoint> TryResolveConnected(this RouterBase router, IProfileInstance profileInstance, Coordinate location, float radiusInMeter, float maxSearchDistance, bool ? forward, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profileInstance

Coordinate location

System.Single radiusInMeter

System.Single maxSearchDistance

System.Nullable<System.Boolean> forward

CancellationToken cancellationToken

Returns
Result<RouterPoint>

TryResolveConnected(RouterBase, IProfileInstance, Single, Single, Single, Single, Nullable<Boolean>)

Resolves a location but also checks if it's connected to the rest of the network.

Declaration
public static Result<RouterPoint> TryResolveConnected(this RouterBase router, IProfileInstance profileInstance, float latitude, float longitude, float radiusInMeter = 2000F, float maxSearchDistance = 50F, bool ? forward = default (bool ? ))
Parameters
RouterBase router

IProfileInstance profileInstance

System.Single latitude

System.Single longitude

System.Single radiusInMeter

System.Single maxSearchDistance

System.Nullable<System.Boolean> forward

Returns
Result<RouterPoint>

TryResolveConnected(RouterBase, IProfileInstance, Single, Single, Single, Single, Nullable<Boolean>, CancellationToken)

Resolves a location but also checks if it's connected to the rest of the network.

Declaration
public static Result<RouterPoint> TryResolveConnected(this RouterBase router, IProfileInstance profileInstance, float latitude, float longitude, float radiusInMeter, float maxSearchDistance, bool ? forward, CancellationToken cancellationToken)
Parameters
RouterBase router

IProfileInstance profileInstance

System.Single latitude

System.Single longitude

System.Single radiusInMeter

System.Single maxSearchDistance

System.Nullable<System.Boolean> forward

CancellationToken cancellationToken

Returns
Result<RouterPoint>

Back to top Built by Itinero, MIT licensed.