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
clientId
orclientSecret
is 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
origins
IEnumerable<PointShape>The origins.
destinations
IEnumerable<PointShape>The destinations.
srid
intSpecifies the SRID (spatial reference system ID). Defaults to 4326.
options
CloudRoutingGetCostMatrixOptionsThe 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
origins
IEnumerable<PointShape>The origins.
destinations
IEnumerable<PointShape>The destinations.
proj4String
stringSpecifies the proj4string (coordinate system).
options
CloudRoutingGetCostMatrixOptionsThe 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
origins
IEnumerable<PointShape>The origins.
destinations
IEnumerable<PointShape>The destinations.
options
CloudRoutingGetCostMatrixOptionsThe 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
origins
IEnumerable<PointShape>The origins.
destinations
IEnumerable<PointShape>The destinations.
srid
intSpecifies the SRID (spatial reference system ID). Defaults to 4326.
options
CloudRoutingGetCostMatrixOptionsThe 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
origins
IEnumerable<PointShape>The origins.
destinations
IEnumerable<PointShape>The destinations.
proj4String
stringSpecifies the proj4string (coordinate system).
options
CloudRoutingGetCostMatrixOptionsThe 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
origins
IEnumerable<PointShape>The origins.
destinations
IEnumerable<PointShape>The destinations.
options
CloudRoutingGetCostMatrixOptionsThe 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
coordinates
IEnumerable<PointShape>A list of coordinates to travel in order.
srid
intSpecifies the SRID (spatial reference system ID). Defaults to 4326.
options
CloudRoutingOptimizationOptionsThe 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
coordinates
IEnumerable<PointShape>A list of coordinates to travel in order.
proj4String
stringSpecifies the proj4string (coordinate system).
options
CloudRoutingOptimizationOptionsThe 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
coordinates
IEnumerable<PointShape>A list of coordinates to travel in order.
options
CloudRoutingOptimizationOptionsThe 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
coordinates
IEnumerable<PointShape>A list of coordinates to travel in order.
srid
intSpecifies the SRID (spatial reference system ID). Defaults to 4326.
options
CloudRoutingOptimizationOptionsThe 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
coordinates
IEnumerable<PointShape>A list of coordinates to travel in order.
proj4String
stringSpecifies the proj4string (coordinate system).
options
CloudRoutingOptimizationOptionsThe 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
coordinates
IEnumerable<PointShape>A list of coordinates to travel in order.
options
CloudRoutingOptimizationOptionsThe 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
waypoints
IEnumerable<PointShape>A list of coordinates to travel in order.
srid
intSpecifies the SRID (spatial reference system ID). Defaults to 4326.
options
CloudRoutingGetRouteOptionsThe 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
waypoints
IEnumerable<PointShape>A list of coordinates to travel in order.
proj4String
stringSpecifies the proj4string (coordinate system).
options
CloudRoutingGetRouteOptionsThe 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
waypoints
IEnumerable<PointShape>A list of coordinates to travel in order.
options
CloudRoutingGetRouteOptionsThe 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
waypoints
IEnumerable<PointShape>A list of coordinates to travel in order.
srid
intSpecifies the SRID (spatial reference system ID). Defaults to 4326.
options
CloudRoutingGetRouteOptionsThe 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
waypoints
IEnumerable<PointShape>A list of coordinates to travel in order.
proj4String
stringSpecifies the proj4string (coordinate system).
options
CloudRoutingGetRouteOptionsThe 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
waypoints
IEnumerable<PointShape>A list of coordinates to travel in order.
options
CloudRoutingGetRouteOptionsThe 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
point
PointShapeThe point.
serviceLimits
IEnumerable<double>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
options
CloudRoutingGetServiceAreaOptionsThe 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
point
PointShapeThe point.
serviceLimits
IEnumerable<TimeSpan>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
options
CloudRoutingGetServiceAreaOptionsThe 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
point
PointShapeThe point.
srid
intSpecifies the SRID (spatial reference system ID). Defaults to 4326.
serviceLimits
IEnumerable<double>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
options
CloudRoutingGetServiceAreaOptionsThe 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
point
PointShapeThe point.
srid
intSpecifies the SRID (spatial reference system ID). Defaults to 4326.
serviceLimits
IEnumerable<TimeSpan>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
options
CloudRoutingGetServiceAreaOptionsThe 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
point
PointShapeThe point.
proj4String
stringSpecifies the proj4string (coordinate system).
serviceLimits
IEnumerable<double>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
options
CloudRoutingGetServiceAreaOptionsThe 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
point
PointShapeThe point.
proj4String
stringSpecifies the proj4string (coordinate system).
serviceLimits
IEnumerable<TimeSpan>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
options
CloudRoutingGetServiceAreaOptionsThe 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
point
PointShapeThe point.
serviceLimits
IEnumerable<double>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
options
CloudRoutingGetServiceAreaOptionsThe 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
point
PointShapeThe point.
serviceLimits
IEnumerable<TimeSpan>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
options
CloudRoutingGetServiceAreaOptionsThe 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
point
PointShapeThe point.
srid
intSpecifies the SRID (spatial reference system ID). Defaults to 4326.
serviceLimits
IEnumerable<double>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
options
CloudRoutingGetServiceAreaOptionsThe 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
point
PointShapeThe point.
srid
intSpecifies the SRID (spatial reference system ID). Defaults to 4326.
serviceLimits
IEnumerable<TimeSpan>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
options
CloudRoutingGetServiceAreaOptionsThe 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
point
PointShapeThe point.
proj4String
stringSpecifies the proj4string (coordinate system).
serviceLimits
IEnumerable<double>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
options
CloudRoutingGetServiceAreaOptionsThe 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
point
PointShapeThe point.
proj4String
stringSpecifies the proj4string (coordinate system).
serviceLimits
IEnumerable<TimeSpan>The list represents the travel distances or travel times to generate for each facility. The maximum number of ServiceLimits is 6.
options
CloudRoutingGetServiceAreaOptionsThe 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
origins
IEnumerable<PointShape>The origins.
destinations
IEnumerable<PointShape>The destinations.
srid
intSpecifies the SRID (spatial reference system ID). Defaults to 4326.
options
CloudRoutingGetCostMatrixOptionsThe 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
origins
IEnumerable<PointShape>The origins.
destinations
IEnumerable<PointShape>The destinations.
proj4String
stringSpecifies the proj4string (coordinate system).
options
CloudRoutingGetCostMatrixOptionsThe 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
origins
IEnumerable<PointShape>The origins.
destinations
IEnumerable<PointShape>The destinations.
options
CloudRoutingGetCostMatrixOptionsThe 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
origins
IEnumerable<PointShape>The origins.
destinations
IEnumerable<PointShape>The destinations.
srid
intSpecifies the SRID (spatial reference system ID). Defaults to 4326.
options
CloudRoutingGetCostMatrixOptionsThe 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
origins
IEnumerable<PointShape>The origins.
destinations
IEnumerable<PointShape>The destinations.
proj4String
stringSpecifies the proj4string (coordinate system).
options
CloudRoutingGetCostMatrixOptionsThe 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
origins
IEnumerable<PointShape>The origins.
destinations
IEnumerable<PointShape>The destinations.
options
CloudRoutingGetCostMatrixOptionsThe options of GetCostMatrix.