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 all

Basic 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:

It is possible to mix different location specifications:

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:

Change to a different system:

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:

Wolfram Research (2016), TravelDistanceList, Wolfram Language function, https://reference.wolfram.com/language/ref/TravelDistanceList.html.

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

BibTeX

@misc{reference.wolfram_2024_traveldistancelist, author="Wolfram Research", title="{TravelDistanceList}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/TravelDistanceList.html}", note=[Accessed: 05-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_traveldistancelist, organization={Wolfram Research}, title={TravelDistanceList}, year={2016}, url={https://reference.wolfram.com/language/ref/TravelDistanceList.html}, note=[Accessed: 05-November-2024 ]}