Skyscraper Views

Make maps of what you can see from the tops of tall buildings.

Run the code to make a map showing the location of the Empire State Building. Try making maps of other buildings, like the Eiffel Tower or the Pantheon:

Note: this can take a while to evaluate the first time, since data has to be retrieved from remote servers.

SHOW/HIDE DETAILS

Press and = to get a natural language input field (LinguisticAssistant). What you type into it is automatically translated, if possible, to a precise representation that the Wolfram Language understands:

In[1]:=
X
Out[1]=

Show that location on a map:

In[2]:=
X
Out[2]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Find the 3D coordinates of the top of the Empire State Building. Find the coordinates of the tops of other buildings, like the Washington Monument or the Burj Khalifa:

SHOW/HIDE DETAILS

Get the geographic coordinates of the Empire State Building:

In[1]:=
X
Out[1]=

Get the height of the Empire State Building:

In[2]:=
X
Out[2]=

Combine the 2D geographic coordinates with the height to get the 3D coordinates of the top of the building. First extract the {latitude,longitude} coordinates from GeoPosition using First:

In[3]:=
X
Out[3]=

Then append the height to get a 3D {latitude,longitude,height} coordinate:

In[4]:=
X
Out[4]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Make a map of what you can see from the top of the Empire State Building. Make maps of what you can see from some other buildings, like the Willis Tower or the Lighthouse of Alexandria:

SHOW/HIDE DETAILS

GeoVisibleRegion shows you the region you can see from a given 3D coordinate.

This gives the 3D coordinate of the top of the Empire State Building:

In[1]:=
X
Out[1]=

This shows what you can see from that position:

In[2]:=
X
Out[2]=

Put those steps together to get the complete expression that maps what you see from the top of the Empire State Building:

In[3]:=
X
Out[3]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Make your code easier to use by turning it into a function. Use the function to make maps of the views from other buildings, like the Transamerica Pyramid or the Hancock Building:

Hint: run the definition of viewmap first.

SHOW/HIDE DETAILS

You can make any expression easier to use by turning it into a function. Replace the parts of the expression that you want to vary, like LinguisticAssistant, with variables, like building. Thats the body of the function (dont run this code):

In[1]:=
X

Give the function a name, like viewmap, and list the variables in square brackets after the name, following each with an underscore (dont run this, either):

In[2]:=
X

Put the body after the function name expression to complete the definition (run this to define the function):

In[3]:=
X

When you call the function, the argument you supply is substituted for building in the body of the function.

Now you can make a map with a short piece of code:

In[4]:=
X
Out[4]=

HIDE DETAILS
In[1]:=
X
In[1]:=
X
Out[1]=

Share ItMake a view-mapping website:

Note: run the code in the previous step first to define the function viewmap.

SHOW/HIDE DETAILS

Deploy a form that asks for a building and makes a map of what you can see from the top of it:

In[1]:=
X
Out[1]=

Click the link in the output to visit the site.

Share the link by right-clicking it and choosing Copy Address. Paste the link into an email, tweet, or other message.

HIDE DETAILS
In[1]:=
X
Out[1]=