Lab 3: GIS, Google Earth and Google Maps

Geog 370 Spring 2010

Note: This lab requires the use of both:

1. Your H drive’s public_html folder (your personal space on the internet).

To set up a folder, go to scroll down to “web publication services” and follow the instructions to set up your web space. This page also has information about your H drive. Talk to ITS if you have problems. You can begin, but not finish this lab without the H drive.

2. A Google account.

If you use gmail, google docs etc… that is a Google account. If you don’t want to put your regular google/gmail account out there as authoring maps, you can create another account for the purpose of this lab. You can begin, but not finish this lab without a Google account.Google account setup:

I. Getting to Know Google Earth (GE)

-Open GE: Start=>programs=>GIS applications=>Google Earth=>Google Earth

You’ll see a big frame with a digital world, navigation controls in the upper right of that frame, a column of data-related stuff on the left and toolbars across the top.

-Hold the mouse cursor (hand) on the world and drag it around- the world moves.

Google earth is a geobrowser, a specialized computer program that pulls geographic data over the internet and visualizes it according to the user’s demands. It is like a specialized, geographic version of Internet Explorer or Firefox that only loads spatial information from Google or user-defined sources. As you zoom and pan, the program downloads the data you are looking at from Google’s servers.

Navigation Controls (in the upper right):

Zoom/Scale scrollbar: The bottom navigation control, it is the line with the + and –

scrollbar. This scrollbar zooms the scale in and out. The scroll button on the mouse does the same function.

-Zoom in as far as you can into a landmass and let the image load. Note how the view arcs and you eventually are looking at the horizon, not straight down.

Look joystick (Top circle): Defines where you are looking from your current location.

-hold the “N”on the circle and drag the mouse around. The N defines north for the digital world and moving it aligns your view to a different compass heading.

-Click the “N” to return it to the top.

-Hold down and drag on the inner circle (with the eye) to look up and down and side to side.

Move joystick (Lower circle). This moves the location of your view.

-Hold on this circle and drag to move the location of your view. This is slower than dragging the earth directly with your mouse cursor.

Finding locations and Data

The column on the left is for finding locations and data. At the top is a Google-style search box.

-Type “Tokyo, Japan” in the search field and hit enter. GE pans and zooms to Tokyo and lists your recent searches below the search box.

Skip over the “Places” section for now to the “Layers” section. The layers section contains a huge assortment of geographic layers that you can turn on to view. This data comes from Google and its partners, and it is hosted on Google servers. You can use this data in GE, but you cannot take it; it is free as in Libre (free speech) not Gratis (free beer).

-Click the box next to “3D buildings” and zoom into the center of Tokyo. (give it plenty of time to load- up to a full minute). These building models are made by users and donated to Google. It takes so long to load them because you are downloading 3D graphics over the internet.

-Turn on/off other data layers to see what is available.

-Turn off the 3d buildings(and any other layers) when you are ready- it will make GE faster.

Question 1.

GE also has 3D terrain. Take a screenshot of a mountain or hill (search for one) as part of a horizon (not viewing straight down). You may have to click the “terrain” box, the last listed data layer in the layerssection.

Question 2.

Find South Building and the Old Well at UNC-Chapel Hill and take a screenshot of them. Was it labeled? Describe actions and thoughts you used to find it.

Be aware, the Old Well is partly obscured by trees. This view may be straight down.

II. Exporting GIS Data to Google Earth

KML (KMZ)

Kml, short for “keyhole markup language,” is an XML-based programming language schema. XML, “extendable markup language,” is a common web programming standard. The name “keyhole” originally comes from the US military. “KEYHOLE” is a top-secret security designation pertaining to US satellite intelligence, originating in cold-war satellite photography programs in the 1960s. Leaked documents say that US spy satellites to this day retain the designation KH-#, for “KEYHOLE.”

In practice, kml is a geo-data file type that can contain most kinds of geographic data and can be visualized in many, many different programs, most notably Google Earth.

A kmz is a zipped (compressed) kml file.

Exporting GIS Data from ArcMap to Google Earth kml

-Copy the lab3 bus stop data to you personal folder

-Open the bus stop data in ArcMap, zoom to an appropriate extent so you can see all the bus stops and save it as an .mxd

-Open ArcToolbox under the window menu and select conversion tools=>to kml=>map to kml

-In the dialogue box, select the mxd you just saved as the map document and the data frame should automatically default to layers

-Create an out put file name and direct it to your personal J drive folder

-Set the Map Output Scale to 1

-Hit OK and the file should export to a kmz

Note: a kmz is simply a zipped (compressed) form of a .kml

-Open your personal J drive folder and double click the new kmz file. It should open in Google Earth and zoom to the newly-created data layer.

Question 3.

Take a screenshot of the bus stops data in Google Earth. As a map for a savvy, GIS-trained user, what are the advantages of viewing the bus stops in GE vs. ArcMap? What are the disadvantages of viewing the bus stops in GE vs. ArcMap?

Getting data in kml back into ArcMap or ArcGIS

Perhaps the biggest problem with kml files is that once geographic data is in kml, it is very difficult to extract that data from the kml to do other work on it in GIS. To do so requires extensions to ArcMap that UNC does not have, a paid subscription to a fancier version of Google Earth only available at the Davis GIS lab, unreliable third party services or specialized scripts. Therefore, we won’t get to it in this lab.

III. Creating data in Google Earth

You can create, save and share basic geographic data with GE in a .kml format.

Creating a Placemark

-Choose a location, anywhere in the world, that you would like visit on trip sometime, find it in GE and zoom into it (Venice’s Cathedral, the palace in Lhasa, Tibet etc…). You may have to define the country in the search box.

-Check the “temporary places” checkbox in the Places section on the left

-Click the yellow pushpin button on the toolbar, move the dialogue box to the side, and place the pushpin on the exact location you wish to visit.

-Fill in a name in the dialogue box and hit OK.

A labeled pushpin should be on the location and be listed in the “temporary places” folder. You can edit this placemark, including the location, by right-clicking its listing in the Places section and selecting “properties.”

Creating a kml (kmz)

-Select the placemark you created by clicking on it in the “temporary places” folder on the left. Go to File=>save=>Save Place As

-Name the kmz file “lab3” and save it to your J drive space.

NOTE 1: name it exactly “lab3” with no capitals or spaces to prevent problems later

NOTE2: you MUST select “save place as” to create a kml file. As a geobrowser, the other options only save a link to a given location, not a file itself.

-Go to File=>open, go to you J drive space and open the “lab3” kmz. lab3 should appear as a new file in the “temporary places” folder.

-Create 6 more placemarks on multiple continents/islands for locations you would like to visit and add them to your lab3 kmz file. You can create them in the lab3 kmz file by keeping it selected or by dragging their listing in the Places section into the lab3 kmz file.

-Save lab3 kmz when you are done.

Note: using the other toolbar buttons you can also create lines, polygons, overlays etc… Add these instead of placemarks if you prefer.

Question 4.

Take a screenshot of GE with as many of the placemarks visible as possible.

Is it possible for you to see all your placemarks at once? Why or why not? What strengths or weaknesses in Google Earth does this illustrate?

IV. Posting that data on the web

One way to take advantage of kmls is by using them in an internet context. Be aware, Google indexes all kmls available on the internet, so if you don’t want Google and its users to start opening your kml (kmz), take it down off your website after spring break.

-Set up your H drive public_html folder. If you have not done so, see the note at the beginning of this lab.

Note: if you already use your H drive public_html folder, I assume you know how to fit the rest of this lab into your existing website.

Putting the data online

-Copy/Paste your lab3.kmz into your H drive public_html fold

-In the following html code, replace where it says “youronyen” with your onyen(yes, right here in the lab document).

<ahref="lab3.kmz">file:///\\SAUCLS20-afs\afsroot\home\e\s\youronyen\public_html\lab3.kmz</a<o:p</o:p</span</p>

-Go to your H Drive public_html folder

-Right click the “index.html” file in your H Drive public_html folder and select openwith=>wordpad on the menu

Note: I suggest wordpad instead of notepad.

-Copy the entire 3 lines of code from above at once and paste it just below the existing code in the index.html file in wordpad.

Here you see the code pasted in as the last 2 lines:

NOTE: make sure that when you paste into wordpad that there is a space between

“<a” and “href="lab3.kmz">file:///\\SAUCLS20…”

-Save the wordpad document

-In a web browser, go to your webpage (make sure to replace "youronyen" with the appropriate name)

there should be a link on your page to:

file:///\\SAUCLS20-afs\afsroot\home\e\s\youronyen\public_html\lab3.kmz

-click on the link and it should take you to some xml code stuff similar to this:

View the kml in Google Maps

-go to maps.google.com

-go to maps search field and search for:

(make sure to replace "youronyen" with the appropriate name)

Now, unlike GE, you can see the whole world and at once.

Question 5.

Take a screenshot of your data in kml presented in Google Maps.

V. Google Maps and My Maps

Working with Google Maps

Google maps is an in-web-browser javascript-based mapping service. The navigation methods are similar to GE, except it has no 3D. Instead of data layers on the side, it has several options across the top: Traffic, Map, Satellite, Terrain and More. When you are searching for something specific, you can also narrow the search by clicking the “search options” to the right of the “search maps” button. These options include locations, user-created maps (map mashups), businesses etc…

Frequently people use Google Maps for directions, which are available by searching or using the “Get Directions” in the upper left. Cool function: you can drag a drop your route in directions to define an alternate route.

My Maps

My Maps is a service in Google Maps that allows you to build and share your own map mashups. It is based and centered on your Google account and the data is hosted on Google’s servers. Being based on Google’s servers makes the maps more accessible, but also give you less control over your data and potential for data surveillance and loss by Google.

-Click on “My Maps” in the upper left under “Google maps”, and then hit the “get started” button under the video.

-Log in to your appropriate Google account or create a Google account

Once you get into the My Maps page, You’ll notice there are now 3 new boxes in the map frame just to the right of the navigation controls. These mapmaking tools are similar to those in Google Earth. You’ll also notice different things on the left side. You can invite other people to “collaborate” with you on your map, you can “import” kml data, title and describe your map. There are also privacy settings which allow you to keep your map public or private. For the purposes of this lab, this My Map must be public, but you can de-list it or delete it after spring break if you want to.

If you want to stop and come back to your My Maps work, hit “save” and then “done” in the upper left. Then click “sign out” in the upper right. You can return to you maps by going to maps.google.com, clicking on “My Maps” and signing in.

Create a My Map with the your kml file

-Name your My Map something like Vacation Ideas.

-click on “import” in the upper left.

-in the Import KML dialogue, paste the url (exact web address, of your kml into the second box:

-click “upload from url”

Note: it says you can browse your computer for the file and upload it, but I could not get this to work.

Customize

Your kml data should now appear in the My Map map frame and your placemarks should be listed on the left. This means that the kml data has been uploaded to Google’s servers within your Google account.

Most of these customization functions are also supported in Google Earth, but are better suited to a general web-browser.

Linking

-In another web browser tab or window, find a good website that is directly relevant to one of your placemark’s locations

-Click that placemark and a speech bubble with options appears

-Click on the “rich text” option

-Type in an appropriate title for the link to the website

-Copy the url (web address) of the topical website you found

-click the link button in the speech bubble (it is the blue chain-link image just to the right of the highlight text button and just to the left of the numbered and bullet points buttons).

-Paste the url of the other website into the dialogue box field and hit ok. The link to that website from your map is now live

Insert pictures

-in another web browser tab or window, locate an appropriate image for the placemark and copy the image’s own url (not the website it is on). You can use Flickr, Google image search or rightclick=>view image on the right photo on a website.

-back in the placemark speech bubble, click the picture button (it is the blue and green button all the way to the right, right under “Edit HTML”)

-Paste the image’s own url into the dialogue box and hit ok. The image should now appear in the speech bubble.

Icons

-Click on the pushpin picture and select a more appropriate icon. You can add other images to the options if you want.

Saving, leaving editing mode

-Hit “ok” in the speech bubble and “done” in the upper left. The map now appears and acts as it would to any internet user. You can go back and edit things by hitting the “edit” button.

-Click on the placemark you edited. The link should work and the picture should appear in the speech bubble.

Question 6.

Take a screenshot of your My Map with the edited placemark speech bubble open.

Question 7.

Aside from customization, all of which you can also do in Google Earth, how is you My Map different from creating a kml file or a GIS file? What are the strengths of the My Map? The deficiencies of this kind of map?

Note: there is a way to take basic google spreadsheets and visualize them in My Maps, but we won’t be getting to that this week. For info on that:

Embedding a My Map on your website

Using links you can embed your vacation My Map as a map on your personal website.

-Click on the “link” link just above the upper right corner of the Google maps frame

-Copy the code listed under “Paste HTML to embed in website”

-Right click the index.html in your H Drive public_html file and select openwith=>wordpad.

-Paste the code you just copied from the Google Maps “Paste HTML” boxon the first new line at the bottom of the code in your index.html document in wordpad.

-Save the wordpad document and view the map on your personal webpage

Question 8.

Paste the web address to your webpagethat includes the embedded My Map here: