This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
thinkgeo_cloud_routing [2019/12/16 07:55] kevinwan |
thinkgeo_cloud_routing [2019/12/16 21:57] (current) brianr [TSP] |
||
---|---|---|---|
Line 78: | Line 78: | ||
Visit the [[https://cloud.thinkgeo.com/help/index.html#/Routing/Get%20cost%20matrixV1|Routing: Cost Matrix]] API explorer page and click "Try It Out" to explore this API online. | Visit the [[https://cloud.thinkgeo.com/help/index.html#/Routing/Get%20cost%20matrixV1|Routing: Cost Matrix]] API explorer page and click "Try It Out" to explore this API online. | ||
- | ==== TSP ==== | + | ==== Optimize Route for TSP ==== |
- | Find the shortest route that reaches every destinations. | + | Find the shortest route through a series of destinations, optionally returning to the starting point. |
<code html> | <code html> | ||
Line 87: | Line 87: | ||
//**URL Parameters**// | //**URL Parameters**// | ||
- | * <html><span class="api-parameter"><span class="api-parameter-name">coordinates</span>: A semicolon-separated list of {y},{x} coordinate pairs to travel. It can be between 2 and 25 coordinates for your request.</span></html> | + | * <html><span class="api-parameter"><span class="api-parameter-name">coordinates</span>: A semicolon-separated list of {y},{x} coordinate pairs to visit along the route. You can specify between 2 and 25 coordinates.</span></html> |
* <html><span class="api-parameter"><span class="api-parameter-name">srid</span>: Optional. The SRID of the input and output feature's coordinate system. Defaults to 4326.</span></html> | * <html><span class="api-parameter"><span class="api-parameter-name">srid</span>: Optional. The SRID of the input and output feature's coordinate system. Defaults to 4326.</span></html> | ||
- | * <html><span class="api-parameter"><span class="api-parameter-name">proj4String</span>: Optional. The Proj4 string of the input and output feature's coordinate system.</span></html> | + | * <html><span class="api-parameter"><span class="api-parameter-name">proj4String</span>: Optional. The Proj string of the input and output feature's coordinate system.</span></html> |
- | * <html><span class="api-parameter"><span class="api-parameter-name">roundtrip</span>: Optional. Indicates whether the returned route is roundtrip, meaning the route returns to the first location (true, default) or not (false).</span></html> | + | * <html><span class="api-parameter"><span class="api-parameter-name">roundtrip</span>: Optional. Indicates whether the returned route is round-trip, meaning the route returns to the starting location (true) or not (false). Defaults to true.</span></html> |
- | * <html><span class="api-parameter"><span class="api-parameter-name">source</span>: Optional. An enum to identify the coordinate at which to start the return route. Accepts first (default) or any. Available values : Any, First</span></html> | + | * <html><span class="api-parameter"><span class="api-parameter-name">source</span>: Optional. Identifies which coordinate should be used as the start point of the route. Acceptable values are <code>first</code>, which uses the first point in the coordinates array, or <code>any</code>, which chooses the most efficient start point. Defaults to <code>first</code>.</span></html> |
- | * <html><span class="api-parameter"><span class="api-parameter-name">destination</span>: Optional. An enum to identify the coordinate at which to end the returned route. Accepts any (default) or last. Available values : Any, Last</span></html> | + | * <html><span class="api-parameter"><span class="api-parameter-name">destination</span>: Optional. Identifies which coordinate should be used as the final destination of the route. Acceptable values are <code>any</code>, which chooses the most efficient start point, or <code>last</code>, which uses the last point in the coordinates array. Defaults to <code>any</code>.</span></html> |
- | * <html><span class="api-parameter"><span class="api-parameter-name">turnByTurn</span>: Optional. Whether to return turn-by-turn instructions or not. false by default.</span></html> | + | * <html><span class="api-parameter"><span class="api-parameter-name">turnByTurn</span>: Optional. Specifies whether to return turn-by-turn directions with your route. Defaults to false.</span></html> |
- | * <html><span class="api-parameter"><span class="api-parameter-name">coordinateSnapRadius</span>: Optional. The maximum distance of a coordinate can be snapped to the road network. Defaults to 5000 meters.</span></html> | + | * <html><span class="api-parameter"><span class="api-parameter-name">coordinateSnapRadius</span>: Optional. The maximum distance a coordinate can be snapped to the road network. Defaults to 5000.</span></html> |
- | * <html><span class="api-parameter"><span class="api-parameter-name">coordinateSnapRadiusUnit</span>: Optional. The unit of the radius to snap the input coordinate to road network.</span></html> | + | * <html><span class="api-parameter"><span class="api-parameter-name">coordinateSnapRadiusUnit</span>: Optional. The unit of the radius to snap the input coordinate to road network. Defaults to meters.</span></html> |
- | * <html><span class="api-parameter"><span class="api-parameter-name">distanceUnit</span>: Optional. The unit of measure in which to express the length of the route.</span></html> | + | * <html><span class="api-parameter"><span class="api-parameter-name">distanceUnit</span>: Optional. The unit of measure in which to express the length of the route. Defaults to meters.</span></html> |
- | * <html><span class="api-parameter"><span class="api-parameter-name">durationUnit</span>: Optional. The unit of the time in which to express the duration of traveling the route.</span></html> | + | * <html><span class="api-parameter"><span class="api-parameter-name">durationUnit</span>: Optional. The unit of the time in which to express the duration of traveling the route. Defaults to minutes.</span></html> |
Visit the [[https://cloud.thinkgeo.com/help/index.html#/Routing/OptimizationV1|Routing: Optimization]] API explorer page and click "Try It Out" to explore this API online. | Visit the [[https://cloud.thinkgeo.com/help/index.html#/Routing/OptimizationV1|Routing: Optimization]] API explorer page and click "Try It Out" to explore this API online. |