生成著名建筑的徒步游览图
使用 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]=