# Wolfram Mathematica

## Generate a Walking Tour of Notable Buildings

Use GeoNearest to retrieve notable buildings in a radius of 1 km around Boston City Hall.

In[1]:=
```position = Entity["Building", "BostonCityHall::96t3t"]; radius = Quantity[1, "Kilometers"];```
In[2]:=
`nearMe = GeoNearest["Building", position, {All, radius}]`
Out[2]=

Plot those buildings on a local map, using built-in icon entities.

show complete Wolfram Language input
In[3]:=
```iconItemPairs = With[{icon = EntityValue[Entity["Icon", "Museum"], "Image"][[1]]}, MapThread[{#1, Graphics[{EdgeForm[Black], FaceForm[#2], icon}, "ImageSize" -> 25]} &, {nearMe, RandomColor[Length@nearMe]}] ]; legend = Column[ Row[Reverse@#] & /@ (MapAt[CommonName, #, 1] & /@ iconItemPairs)]; Row[{ GeoGraphics[{EdgeForm[Darker[Orange]], Orange, GeoDisk[position, radius], GeoMarker[position, "Color" -> Red], GeoMarker @@@ iconItemPairs}, ImageSize -> 400], legend }]```
Out[3]=

Use TravelDirections to compute a walking tour of those entities.

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]=
show complete Wolfram Language input
In[7]:=
```Row[{ GeoGraphics[{ Thickness[0.01], Darker@Red, GeoPath@travelDirectionsForPath, EdgeForm[Darker[Orange]], Orange, GeoDisk[position, radius], GeoMarker[position, "Color" -> Red], GeoMarker @@@ iconItemPairs }, ImageSize -> 400], legend }]```
Out[7]=

These are detailed instructions on how to follow that path.

In[8]:=
`travelDirectionsForPath["ManeuverGrid"]`
Out[8]=