# Wolfram Language™

## Travel Time & Distance

Estimate distance and duration of a road trip.

Travel between two distant cities.

In:= ```cities = {Entity["City", {"Lisbon", "Lisboa", "Portugal"}], Entity["City", {"Beijing", "Beijing", "China"}]};```

This is the geodesic distance between them.

In:= `GeoDistance[cities]`
Out= This is the length of the computed road trip.

In:= `TravelDistance[cities]`
Out= And this is the estimated driving time, assuming continuous driving with no stops.

In:= `TravelTime[cities]`
Out= This object contains the actual set of travel instructions.

In:= ```td = TravelDirections[{Entity[ "City", {"Lisbon", "Lisboa", "Portugal"}], Entity["City", {"Beijing", "Beijing", "China"}]}]```
Out= Represent the trajectory (in red) on a Mercator map and compare with the geodesic trajectory (in blue), which is shorter, as you saw before.

In:= ```GeoGraphics[{Thick, Red, GeoPath[td], Blue, GeoPath[{Entity["City", {"Lisbon", "Lisboa", "Portugal"}], Entity["City", {"Beijing", "Beijing", "China"}]}]}, GeoProjection -> "Mercator", GeoGridLines -> Automatic]```
Out= An azimuthal projection shows more clearly that the geodesic is shorter than the travel path.

In:= ```GeoGraphics[{Thick, Red, GeoPath[td], Blue, GeoPath[{Entity["City", {"Lisbon", "Lisboa", "Portugal"}], Entity["City", {"Beijing", "Beijing", "China"}]}]}, GeoProjection -> "Mercator", GeoGridLines -> Automatic]; Show[%, GeoProjection -> "LambertAzimuthal", GeoZoomLevel -> 4]```
Out= 