有名な建物を徒歩で見学するルートを生成する
GeoNearestを使って,ボストンシティホールの周り半径1キロメートルの地域にある有名な建物を取り出すことができる.
In[1]:=
position = Entity["Building", "BostonCityHall::96t3t"];
radius = Quantity[1, "Kilometers"];
In[2]:=
nearMe = GeoNearest["Building", position, {All, radius}]
Out[2]=
組込みのアイコン実体を使って,地域の地図上に建物をプロットする.
完全なWolfram言語入力を表示する
Out[3]=
TravelDirectionsを使って,これらの実体を徒歩で見学するルートを計算する.
In[4]:=
tourPlaces = Prepend[nearMe, position];
In[5]:=
{distance, tourPath} =
FindShortestTour[GeoPosition /@ tourPlaces, 1, Length@tourPlaces]
Out[5]=
In[6]:=
travelDirectionsForPath =
TravelDirections[tourPlaces[[tourPath]], TravelMethod -> "Walking"]
Out[6]=
完全なWolfram言語入力を表示する
Out[7]=
以下は,ルートについての詳しい指示である.
In[8]:=
travelDirectionsForPath["ManeuverGrid"]
Out[8]=