WOLFRAM

TravelDistance[{loc1,loc2,}]

gives the estimated distance for travel from loc1 to loc2, .

Details and Options

Examples

open allclose all

Basic Examples  (1)Summary of the most common use cases

Compute an estimation of the total distance of a trip:

Out[1]=1

Scope  (4)Survey of the scope of standard use cases

Distance to travel between two geographic locations:

Out[3]=3

Use GeoPosition objects to define locations:

Out[1]=1

Compute distance to travel through several locations:

Out[1]=1

Specify locations as addresses:

Out[1]=1

Options  (2)Common values & functionality for each option

TravelMethod  (1)

TravelDistance uses "Driving" as default method of transportation:

Out[1]=1

Use "Walking" instead:

Out[2]=2

UnitSystem  (1)

The default unit system is given by $UnitSystem, usually determined by your location, in this case "Imperial":

Out[1]=1

Specify the unit system of the result:

Out[2]=2

Properties & Relations  (2)Properties of the function, and connections to other functions

Compute the estimated travel distance between two locations:

Out[11]=11

It can also be computed with TravelDirections:

Out[12]=12

Or as a property of a TravelDirectionsData object:

Out[13]=13
Out[14]=14

Compute the distances between consecutive pairs of locations:

Out[2]=2

They can also be obtained by combining Partition and TravelDistance, though less efficiently:

Out[3]=3
Wolfram Research (2015), TravelDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/TravelDistance.html.
Wolfram Research (2015), TravelDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/TravelDistance.html.

Text

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

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

CMS

Wolfram Language. 2015. "TravelDistance." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TravelDistance.html.

Wolfram Language. 2015. "TravelDistance." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TravelDistance.html.

APA

Wolfram Language. (2015). TravelDistance. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TravelDistance.html

Wolfram Language. (2015). TravelDistance. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TravelDistance.html

BibTeX

@misc{reference.wolfram_2025_traveldistance, author="Wolfram Research", title="{TravelDistance}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/TravelDistance.html}", note=[Accessed: 01-April-2025 ]}

@misc{reference.wolfram_2025_traveldistance, author="Wolfram Research", title="{TravelDistance}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/TravelDistance.html}", note=[Accessed: 01-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_traveldistance, organization={Wolfram Research}, title={TravelDistance}, year={2015}, url={https://reference.wolfram.com/language/ref/TravelDistance.html}, note=[Accessed: 01-April-2025 ]}

@online{reference.wolfram_2025_traveldistance, organization={Wolfram Research}, title={TravelDistance}, year={2015}, url={https://reference.wolfram.com/language/ref/TravelDistance.html}, note=[Accessed: 01-April-2025 ]}