TravelDistanceList
TravelDistanceList[{loc1,loc2,…,locn}]
returns the list {TravelDistance[loc1,loc2],…,TravelDistance[locn-1,locn]}.
Details and Options
- The locations loci in TravelDistanceList[{loc1,…,locn}] can be given as pairs {lat,lon} in degrees, GeoPosition objects, geographic Entity objects, or any other specification of a location.
- The result is returned as a QuantityArray object with length units.
- If the input list of locations has length n, the resulting list of distances has length n-1.
Examples
open allclose allBasic Examples (1)
List of consecutive driving distances between cities:
Convert the QuantityArray object to its normal form:
Scope (2)
Input can be given as a list of GeoPosition objects:
Options (2)
TravelMethod (1)
The distances returned correspond to routes that are optimal for a certain method of transportation. TravelDistanceList uses "Driving" as the default:
UnitSystem (1)
The default unit of the result is determined by the value of $UnitSystem:
Properties & Relations (3)
TravelDistanceList is basically equivalent to (though much faster than) a combination of Subsequences and TravelDistance:
The sum of the distances returned by TravelDistanceList is equivalent to the total distance returned by TravelDistance:
TravelDistanceList reports distance by road. GeoDistanceList reports geodesic distance:
TravelDistanceList[{loc}] returns an empty list:
TravelDistanceList[{}] is not defined:
Text
Wolfram Research (2016), TravelDistanceList, Wolfram Language function, https://reference.wolfram.com/language/ref/TravelDistanceList.html.
CMS
Wolfram Language. 2016. "TravelDistanceList." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TravelDistanceList.html.
APA
Wolfram Language. (2016). TravelDistanceList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TravelDistanceList.html