Class RoutingCloudClient
A class provides the methods to access the Routing APIs.
public class RoutingCloudClient : CloudClient, IDisposable
- Inheritance
-
RoutingCloudClient
- Implements
- Inherited Members
Remarks
A class provides the methods to access the Routing APIs.
Constructors
RoutingCloudClient()
Initilizes an instance. You need apply client Id and secret by properties.
public RoutingCloudClient()
RoutingCloudClient(string, string)
Initializes an instance with ClientID and ClientSecret. It will send a request to GIS Server to gain the token which will be added to the Header for all the requests.
public RoutingCloudClient(string clientId, string clientSecret)
Parameters
Exceptions
- ArgumentNullException
Thrown when the
clientIdorclientSecretis null.
Methods
GetDistanceCostMatrix(IEnumerable<PointShape>, IEnumerable<PointShape>, int, CloudRoutingGetCostMatrixOptions)
Generate a matrix of travel times or distances between each location in a collection.
public CloudRoutingGetDistanceCostMatrixResult GetDistanceCostMatrix(IEnumerable<PointShape> origins, IEnumerable<PointShape> destinations, int srid, CloudRoutingGetCostMatrixOptions options = null)
Parameters
originsIEnumerable<PointShape>The origins.
destinationsIEnumerable<PointShape>The destinations.
sridintSpecifies the SRID (spatial reference system ID). Defaults to 4326.
optionsCloudRoutingGetCostMatrixOptionsThe options of GetCostMatrix.
Returns
GetDistanceCostMatrix(IEnumerable<PointShape>, IEnumerable<PointShape>, string, CloudRoutingGetCostMatrixOptions)
Generate a matrix of travel times or distances between each location in a collection.
public CloudRoutingGetDistanceCostMatrixResult GetDistanceCostMatrix(IEnumerable<PointShape> origins, IEnumerable<PointShape> destinations, string proj4String, CloudRoutingGetCostMatrixOptions options = null)
Parameters
originsIEnumerable<PointShape>The origins.
destinationsIEnumerable<PointShape>The destinations.
proj4StringstringSpecifies the proj4string (coordinate system).
optionsCloudRoutingGetCostMatrixOptionsThe options of GetCostMatrix.
Returns
GetDistanceCostMatrix(IEnumerable<PointShape>, IEnumerable<PointShape>, CloudRoutingGetCostMatrixOptions)
Generate a matrix of travel times or distances between each location in a collection.
public CloudRoutingGetDistanceCostMatrixResult GetDistanceCostMatrix(IEnumerable<PointShape> origins, IEnumerable<PointShape> destinations, CloudRoutingGetCostMatrixOptions options = null)
Parameters
originsIEnumerable<PointShape>The origins.
destinationsIEnumerable<PointShape>The destinations.
optionsCloudRoutingGetCostMatrixOptionsThe options of GetCostMatrix.
Returns
GetDistanceCostMatrixAsync(IEnumerable<PointShape>, IEnumerable<PointShape>, int, CloudRoutingGetCostMatrixOptions)
Generate a matrix of travel times or distances between each location in a collection.
public Task<CloudRoutingGetDistanceCostMatrixResult> GetDistanceCostMatrixAsync(IEnumerable<PointShape> origins, IEnumerable<PointShape> destinations, int srid, CloudRoutingGetCostMatrixOptions options = null)
Parameters
originsIEnumerable<PointShape>The origins.
destinationsIEnumerable<PointShape>The destinations.
sridintSpecifies the SRID (spatial reference system ID). Defaults to 4326.
optionsCloudRoutingGetCostMatrixOptionsThe options of GetCostMatrix.
Returns
GetDistanceCostMatrixAsync(IEnumerable<PointShape>, IEnumerable<PointShape>, string, CloudRoutingGetCostMatrixOptions)
Generate a matrix of travel times or distances between each location in a collection.
public Task<CloudRoutingGetDistanceCostMatrixResult> GetDistanceCostMatrixAsync(IEnumerable<PointShape> origins, IEnumerable<PointShape> destinations, string proj4String, CloudRoutingGetCostMatrixOptions options = null)
Parameters
originsIEnumerable<PointShape>The origins.
destinationsIEnumerable<PointShape>The destinations.
proj4StringstringSpecifies the proj4string (coordinate system).
optionsCloudRoutingGetCostMatrixOptionsThe options of GetCostMatrix.
Returns
GetDistanceCostMatrixAsync(IEnumerable<PointShape>, IEnumerable<PointShape>, CloudRoutingGetCostMatrixOptions)
Generate a matrix of travel times or distances between each location in a collection.
public Task<CloudRoutingGetDistanceCostMatrixResult> GetDistanceCostMatrixAsync(IEnumerable<PointShape> origins, IEnumerable<PointShape> destinations, CloudRoutingGetCostMatrixOptions options = null)
Parameters
originsIEnumerable<PointShape>The origins.
destinationsIEnumerable<PointShape>The destinations.
optionsCloudRoutingGetCostMatrixOptionsThe options of GetCostMatrix.
Returns
GetOptimizedRoute(IEnumerable<PointShape>, int, CloudRoutingOptimizationOptions)
The Optimization API returns a duration-optimized route between the input coordinates, known as Traveling Salesman Problem.
public CloudRoutingOptimizationResult GetOptimizedRoute(IEnumerable<PointShape> coordinates, int srid, CloudRoutingOptimizationOptions options = null)
Parameters
coordinatesIEnumerable<PointShape>A list of coordinates to travel in order.
sridintSpecifies the SRID (spatial reference system ID). Defaults to 4326.
optionsCloudRoutingOptimizationOptionsThe options for the optimization. CloudRoutingOptimizationOptions
Returns
GetOptimizedRoute(IEnumerable<PointShape>, string, CloudRoutingOptimizationOptions)
The Optimization API returns a duration-optimized route between the input coordinates, known as Traveling Salesman Problem.
public CloudRoutingOptimizationResult GetOptimizedRoute(IEnumerable<PointShape> coordinates, string proj4String, CloudRoutingOptimizationOptions options = null)
Parameters
coordinatesIEnumerable<PointShape>A list of coordinates to travel in order.
proj4StringstringSpecifies the proj4string (coordinate system).
optionsCloudRoutingOptimizationOptionsThe options for the optimization. CloudRoutingOptimizationOptions
Returns
GetOptimizedRoute(IEnumerable<PointShape>, CloudRoutingOptimizationOptions)
The Optimization API returns a duration-optimized route between the input coordinates, known as Traveling Salesman Problem.
public CloudRoutingOptimizationResult GetOptimizedRoute(IEnumerable<PointShape> coordinates, CloudRoutingOptimizationOptions options = null)
Parameters
coordinatesIEnumerable<PointShape>A list of coordinates to travel in order.
optionsCloudRoutingOptimizationOptionsThe options for the optimization. CloudRoutingOptimizationOptions
Returns
GetOptimizedRouteAsync(IEnumerable<PointShape>, int, CloudRoutingOptimizationOptions)
The Optimization API returns a duration-optimized route between the input coordinates, known as Traveling Salesman Problem.
public Task<CloudRoutingOptimizationResult> GetOptimizedRouteAsync(IEnumerable<PointShape> coordinates, int srid, CloudRoutingOptimizationOptions options = null)
Parameters
coordinatesIEnumerable<PointShape>A list of coordinates to travel in order.
sridintSpecifies the SRID (spatial reference system ID). Defaults to 4326.
optionsCloudRoutingOptimizationOptionsThe options for the optimization. CloudRoutingOptimizationOptions
Returns
GetOptimizedRouteAsync(IEnumerable<PointShape>, string, CloudRoutingOptimizationOptions)
The Optimization API returns a duration-optimized route between the input coordinates, known as Traveling Salesman Problem.
public Task<CloudRoutingOptimizationResult> GetOptimizedRouteAsync(IEnumerable<PointShape> coordinates, string proj4String, CloudRoutingOptimizationOptions options = null)
Parameters
coordinatesIEnumerable<PointShape>A list of coordinates to travel in order.
proj4StringstringSpecifies the proj4string (coordinate system).
optionsCloudRoutingOptimizationOptionsThe options for the optimization. CloudRoutingOptimizationOptions
Returns
GetOptimizedRouteAsync(IEnumerable<PointShape>, CloudRoutingOptimizationOptions)
The Optimization API returns a duration-optimized route between the input coordinates, known as Traveling Salesman Problem.
public Task<CloudRoutingOptimizationResult> GetOptimizedRouteAsync(IEnumerable<PointShape> coordinates, CloudRoutingOptimizationOptions options = null)
Parameters
coordinatesIEnumerable<PointShape>A list of coordinates to travel in order.
optionsCloudRoutingOptimizationOptionsThe options for the optimization. CloudRoutingOptimizationOptions
Returns
GetRoute(IEnumerable<PointShape>, int, CloudRoutingGetRouteOptions)
Calculate a route through the specified waypoints.
public CloudRoutingGetRouteResult GetRoute(IEnumerable<PointShape> waypoints, int srid, CloudRoutingGetRouteOptions options = null)
Parameters
waypointsIEnumerable<PointShape>A list of coordinates to travel in order.
sridintSpecifies the SRID (spatial reference system ID). Defaults to 4326.
optionsCloudRoutingGetRouteOptionsThe options for the GetRoute. CloudRoutingGetRouteOptions
Returns
GetRoute(IEnumerable<PointShape>, string, CloudRoutingGetRouteOptions)
Calculate a route through the specified waypoints.
public CloudRoutingGetRouteResult GetRoute(IEnumerable<PointShape> waypoints, string proj4String, CloudRoutingGetRouteOptions options = null)
Parameters
waypointsIEnumerable<PointShape>A list of coordinates to travel in order.
proj4StringstringSpecifies the proj4string (coordinate system).
optionsCloudRoutingGetRouteOptionsThe options for the GetRoute. CloudRoutingGetRouteOptions
Returns
GetRoute(IEnumerable<PointShape>, CloudRoutingGetRouteOptions)
Calculate a route through the specified waypoints.
public CloudRoutingGetRouteResult GetRoute(IEnumerable<PointShape> waypoints, CloudRoutingGetRouteOptions options = null)
Parameters
waypointsIEnumerable<PointShape>A list of coordinates to travel in order.
optionsCloudRoutingGetRouteOptionsThe options for the GetRoute. CloudRoutingGetRouteOptions
Returns
GetRouteAsync(IEnumerable<PointShape>, int, CloudRoutingGetRouteOptions)
Calculate a route through the specified waypoints.
public Task<CloudRoutingGetRouteResult> GetRouteAsync(IEnumerable<PointShape> waypoints, int srid, CloudRoutingGetRouteOptions options = null)
Parameters
waypointsIEnumerable<PointShape>A list of coordinates to travel in order.
sridintSpecifies the SRID (spatial reference system ID). Defaults to 4326.
optionsCloudRoutingGetRouteOptionsThe options for the GetRoute. CloudRoutingGetRouteOptions
Returns
GetRouteAsync(IEnumerable<PointShape>, string, CloudRoutingGetRouteOptions)
Calculate a route through the specified waypoints.
public Task<CloudRoutingGetRouteResult> GetRouteAsync(IEnumerable<PointShape> waypoints, string proj4String, CloudRoutingGetRouteOptions options = null)
Parameters
waypointsIEnumerable<PointShape>A list of coordinates to travel in order.
proj4StringstringSpecifies the proj4string (coordinate system).
optionsCloudRoutingGetRouteOptionsThe options for the GetRoute. CloudRoutingGetRouteOptions
Returns
GetRouteAsync(IEnumerable<PointShape>, CloudRoutingGetRouteOptions)
Calculate a route through the specified waypoints.
public Task<CloudRoutingGetRouteResult> GetRouteAsync(IEnumerable<PointShape> waypoints, CloudRoutingGetRouteOptions options = null)
Parameters
waypointsIEnumerable<PointShape>A list of coordinates to travel in order.
optionsCloudRoutingGetRouteOptionsThe options for the GetRoute. CloudRoutingGetRouteOptions
Returns
GetServiceArea(PointShape, IEnumerable<double>, CloudRoutingGetServiceAreaOptions)
Calculate the ServiceArea through the specified point.
public CloudRoutingGetServiceAreaResult GetServiceArea(PointShape point, IEnumerable<double> serviceLimits, CloudRoutingGetServiceAreaOptions options = null)
Parameters
pointPointShapeThe point.
serviceLimitsIEnumerable<double>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
optionsCloudRoutingGetServiceAreaOptionsThe options for the GetServiceArea.
Returns
GetServiceArea(PointShape, IEnumerable<TimeSpan>, CloudRoutingGetServiceAreaOptions)
Calculate the ServiceArea through the specified point.
public CloudRoutingGetServiceAreaResult GetServiceArea(PointShape point, IEnumerable<TimeSpan> serviceLimits, CloudRoutingGetServiceAreaOptions options = null)
Parameters
pointPointShapeThe point.
serviceLimitsIEnumerable<TimeSpan>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
optionsCloudRoutingGetServiceAreaOptionsThe options for the GetServiceArea.
Returns
GetServiceArea(PointShape, int, IEnumerable<double>, CloudRoutingGetServiceAreaOptions)
Calculate the ServiceArea through the specified point.
public CloudRoutingGetServiceAreaResult GetServiceArea(PointShape point, int srid, IEnumerable<double> serviceLimits, CloudRoutingGetServiceAreaOptions options = null)
Parameters
pointPointShapeThe point.
sridintSpecifies the SRID (spatial reference system ID). Defaults to 4326.
serviceLimitsIEnumerable<double>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
optionsCloudRoutingGetServiceAreaOptionsThe options for the GetServiceArea.
Returns
GetServiceArea(PointShape, int, IEnumerable<TimeSpan>, CloudRoutingGetServiceAreaOptions)
Calculate the ServiceArea through the specified point.
public CloudRoutingGetServiceAreaResult GetServiceArea(PointShape point, int srid, IEnumerable<TimeSpan> serviceLimits, CloudRoutingGetServiceAreaOptions options = null)
Parameters
pointPointShapeThe point.
sridintSpecifies the SRID (spatial reference system ID). Defaults to 4326.
serviceLimitsIEnumerable<TimeSpan>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
optionsCloudRoutingGetServiceAreaOptionsThe options for the GetServiceArea.
Returns
GetServiceArea(PointShape, string, IEnumerable<double>, CloudRoutingGetServiceAreaOptions)
Calculate the ServiceArea through the specified point.
public CloudRoutingGetServiceAreaResult GetServiceArea(PointShape point, string proj4String, IEnumerable<double> serviceLimits, CloudRoutingGetServiceAreaOptions options = null)
Parameters
pointPointShapeThe point.
proj4StringstringSpecifies the proj4string (coordinate system).
serviceLimitsIEnumerable<double>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
optionsCloudRoutingGetServiceAreaOptionsThe options for the GetServiceArea.
Returns
GetServiceArea(PointShape, string, IEnumerable<TimeSpan>, CloudRoutingGetServiceAreaOptions)
Calculate the ServiceArea through the specified point.
public CloudRoutingGetServiceAreaResult GetServiceArea(PointShape point, string proj4String, IEnumerable<TimeSpan> serviceLimits, CloudRoutingGetServiceAreaOptions options = null)
Parameters
pointPointShapeThe point.
proj4StringstringSpecifies the proj4string (coordinate system).
serviceLimitsIEnumerable<TimeSpan>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
optionsCloudRoutingGetServiceAreaOptionsThe options for the GetServiceArea.
Returns
GetServiceAreaAsync(PointShape, IEnumerable<double>, CloudRoutingGetServiceAreaOptions)
Calculate the ServiceArea through the specified point.
public Task<CloudRoutingGetServiceAreaResult> GetServiceAreaAsync(PointShape point, IEnumerable<double> serviceLimits, CloudRoutingGetServiceAreaOptions options = null)
Parameters
pointPointShapeThe point.
serviceLimitsIEnumerable<double>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
optionsCloudRoutingGetServiceAreaOptionsThe options for the GetServiceArea.
Returns
GetServiceAreaAsync(PointShape, IEnumerable<TimeSpan>, CloudRoutingGetServiceAreaOptions)
Calculate the ServiceArea through the specified point.
public Task<CloudRoutingGetServiceAreaResult> GetServiceAreaAsync(PointShape point, IEnumerable<TimeSpan> serviceLimits, CloudRoutingGetServiceAreaOptions options = null)
Parameters
pointPointShapeThe point.
serviceLimitsIEnumerable<TimeSpan>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
optionsCloudRoutingGetServiceAreaOptionsThe options for the GetServiceArea.
Returns
GetServiceAreaAsync(PointShape, int, IEnumerable<double>, CloudRoutingGetServiceAreaOptions)
Calculate the ServiceArea through the specified point.
public Task<CloudRoutingGetServiceAreaResult> GetServiceAreaAsync(PointShape point, int srid, IEnumerable<double> serviceLimits, CloudRoutingGetServiceAreaOptions options = null)
Parameters
pointPointShapeThe point.
sridintSpecifies the SRID (spatial reference system ID). Defaults to 4326.
serviceLimitsIEnumerable<double>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
optionsCloudRoutingGetServiceAreaOptionsThe options for the GetServiceArea.
Returns
GetServiceAreaAsync(PointShape, int, IEnumerable<TimeSpan>, CloudRoutingGetServiceAreaOptions)
Calculate the ServiceArea through the specified point.
public Task<CloudRoutingGetServiceAreaResult> GetServiceAreaAsync(PointShape point, int srid, IEnumerable<TimeSpan> serviceLimits, CloudRoutingGetServiceAreaOptions options = null)
Parameters
pointPointShapeThe point.
sridintSpecifies the SRID (spatial reference system ID). Defaults to 4326.
serviceLimitsIEnumerable<TimeSpan>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
optionsCloudRoutingGetServiceAreaOptionsThe options for the GetServiceArea.
Returns
GetServiceAreaAsync(PointShape, string, IEnumerable<double>, CloudRoutingGetServiceAreaOptions)
Calculate the ServiceArea through the specified point.
public Task<CloudRoutingGetServiceAreaResult> GetServiceAreaAsync(PointShape point, string proj4String, IEnumerable<double> serviceLimits, CloudRoutingGetServiceAreaOptions options = null)
Parameters
pointPointShapeThe point.
proj4StringstringSpecifies the proj4string (coordinate system).
serviceLimitsIEnumerable<double>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
optionsCloudRoutingGetServiceAreaOptionsThe options for the GetServiceArea.
Returns
GetServiceAreaAsync(PointShape, string, IEnumerable<TimeSpan>, CloudRoutingGetServiceAreaOptions)
Calculate the ServiceArea through the specified point.
public Task<CloudRoutingGetServiceAreaResult> GetServiceAreaAsync(PointShape point, string proj4String, IEnumerable<TimeSpan> serviceLimits, CloudRoutingGetServiceAreaOptions options = null)
Parameters
pointPointShapeThe point.
proj4StringstringSpecifies the proj4string (coordinate system).
serviceLimitsIEnumerable<TimeSpan>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
optionsCloudRoutingGetServiceAreaOptionsThe options for the GetServiceArea.
Returns
GetTimeCostMatrix(IEnumerable<PointShape>, IEnumerable<PointShape>, int, CloudRoutingGetCostMatrixOptions)
Generate a matrix of travel times or distances between each location in a collection.
public CloudRoutingGetTimeCostMatrixResult GetTimeCostMatrix(IEnumerable<PointShape> origins, IEnumerable<PointShape> destinations, int srid, CloudRoutingGetCostMatrixOptions options = null)
Parameters
originsIEnumerable<PointShape>The origins.
destinationsIEnumerable<PointShape>The destinations.
sridintSpecifies the SRID (spatial reference system ID). Defaults to 4326.
optionsCloudRoutingGetCostMatrixOptionsThe options of GetCostMatrix.
Returns
GetTimeCostMatrix(IEnumerable<PointShape>, IEnumerable<PointShape>, string, CloudRoutingGetCostMatrixOptions)
Generate a matrix of travel times or distances between each location in a collection.
public CloudRoutingGetTimeCostMatrixResult GetTimeCostMatrix(IEnumerable<PointShape> origins, IEnumerable<PointShape> destinations, string proj4String, CloudRoutingGetCostMatrixOptions options = null)
Parameters
originsIEnumerable<PointShape>The origins.
destinationsIEnumerable<PointShape>The destinations.
proj4StringstringSpecifies the proj4string (coordinate system).
optionsCloudRoutingGetCostMatrixOptionsThe options of GetCostMatrix.
Returns
GetTimeCostMatrix(IEnumerable<PointShape>, IEnumerable<PointShape>, CloudRoutingGetCostMatrixOptions)
Generate a matrix of travel times or distances between each location in a collection.
public CloudRoutingGetTimeCostMatrixResult GetTimeCostMatrix(IEnumerable<PointShape> origins, IEnumerable<PointShape> destinations, CloudRoutingGetCostMatrixOptions options = null)
Parameters
originsIEnumerable<PointShape>The origins.
destinationsIEnumerable<PointShape>The destinations.
optionsCloudRoutingGetCostMatrixOptionsThe options of GetCostMatrix.
Returns
GetTimeCostMatrixAsync(IEnumerable<PointShape>, IEnumerable<PointShape>, int, CloudRoutingGetCostMatrixOptions)
Generate a matrix of travel times or distances between each location in a collection.
public Task<CloudRoutingGetTimeCostMatrixResult> GetTimeCostMatrixAsync(IEnumerable<PointShape> origins, IEnumerable<PointShape> destinations, int srid, CloudRoutingGetCostMatrixOptions options = null)
Parameters
originsIEnumerable<PointShape>The origins.
destinationsIEnumerable<PointShape>The destinations.
sridintSpecifies the SRID (spatial reference system ID). Defaults to 4326.
optionsCloudRoutingGetCostMatrixOptionsThe options of GetCostMatrix.
Returns
GetTimeCostMatrixAsync(IEnumerable<PointShape>, IEnumerable<PointShape>, string, CloudRoutingGetCostMatrixOptions)
Generate a matrix of travel times or distances between each location in a collection.
public Task<CloudRoutingGetTimeCostMatrixResult> GetTimeCostMatrixAsync(IEnumerable<PointShape> origins, IEnumerable<PointShape> destinations, string proj4String, CloudRoutingGetCostMatrixOptions options = null)
Parameters
originsIEnumerable<PointShape>The origins.
destinationsIEnumerable<PointShape>The destinations.
proj4StringstringSpecifies the proj4string (coordinate system).
optionsCloudRoutingGetCostMatrixOptionsThe options of GetCostMatrix.
Returns
GetTimeCostMatrixAsync(IEnumerable<PointShape>, IEnumerable<PointShape>, CloudRoutingGetCostMatrixOptions)
Generate a matrix of travel times or distances between each location in a collection.
public Task<CloudRoutingGetTimeCostMatrixResult> GetTimeCostMatrixAsync(IEnumerable<PointShape> origins, IEnumerable<PointShape> destinations, CloudRoutingGetCostMatrixOptions options = null)
Parameters
originsIEnumerable<PointShape>The origins.
destinationsIEnumerable<PointShape>The destinations.
optionsCloudRoutingGetCostMatrixOptionsThe options of GetCostMatrix.