# Wolfram言語™

## 移動時間と移動距離

2つの異なる都市の間を移動する．

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

In[2]:=
`GeoDistance[cities]`
Out[2]=

In[3]:=
`TravelDistance[cities]`
Out[3]=

In[4]:=
`TravelTime[cities]`
Out[4]=

このオブジェクトには，実際の移動経路が含まれている．

In[5]:=
```td = TravelDirections[{Entity[ "City", {"Lisbon", "Lisboa", "Portugal"}], Entity["City", {"Beijing", "Beijing", "China"}]}]```
Out[5]=

メルカトル図法の地図上に軌道（赤）を描き，測地軌道（青）と比較する．先ほどの例でも見たように，後者の方が短い．

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

In[7]:=
```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[7]=