- Examine satellite image
- Image enhancement
- Getting to know google earth
- Creating a UNBC campus map with Google Earth
- Adding spatial data to Google Earth from ArcGIS
- Convert KML file to ArcGIS shape file
- Draping 2D Maps
1. Examining Satellite Image
In this section, you will be working with Landsat Thematic Mapper satellite imagery to enhance understanding of the data bands, their display and ways of extracting information from them. This is a fairly short lab to enable you to continue with your assignment afterwards.
Datasets: cranhill.tif and band4.tif: Landsat satellite image
- Login to local machine and start terminal server.
- Create a new folder lab9 under geog205 for this lab.
- Start ArcMap with a new map file.
The image datasets are located at L:\labs\geog205\google_earth\
- Add the dataset cranhill.tif located in L:\labs\geog205\google_earth\
By default the image is displayed with the first three bands in RGB color mode. There is a wedge of ‘no data’ in the NE corner.
When you first load the image, it might show up all in black. In this case, you need to stretch the image to make it clearly displayed with maximum color ramp. (ignore if the image looks OK):
- double-click on cranhill.tif, on the symbology tab, type should be ‘standard deviations’, and statistics ‘From the current display extent’ Click OK to apply any changes.
The image cranhill.tif is in TIF image format and contains 6 bands (Band 7 has been excluded)
|Near Infrared Band|
|Mid Infrared Band|
|Mid Infrared Band|
cranhill.tif is displayed with band 1 in red , band 2 in green , and band 3 in blue
Bands 1, 2, 3
Band 5, 4, 3
Image Bands: Refers to the individual Landsat TM bands ranging from 1 -7. These bands start in the blue visible wavelengths and move through to the thermal wavelengths in Band 6
Display guns (RGB): up to three planes can be displayed simultaneously in red-green-blue (RGB). Displaying the same plane three times in RGB produces a gray tone image.
Now toggle the R display (Red) to band 3 , and B (Blue) to band 1 as follows:
- Click the red box below Cranhill layer and choose Band_3. Band 3 is displayed in red color gun.
- Click the blue box below Cranhill layer and choose Band_1. Band 1 is displayed in blue color gun.
NOTE: Reorganizing the color guns does not create a huge difference in appearance, but it makes agricultural fields slightly pink instead of blue. This color composite is now equivalent to normal color with the blue, green and red channels shown in B, G, and R respectively (below left).
2. Image Enhancement
The image displayed above is already enhanced with the Standard Deviation method (in the Symbology Tab). The original un-enhanced data would have poor contrast (if you change to none for the stretch.
Now move each band up one and display 2, 3 and 4 in the B,G, and R guns respectively. This band and color gun combination corresponds approximately to color infrared film (healthy vegetation in red, reflecting high near-IR)
Now change the display to give the image most contrast (the right image above)
- Click the red box below Cranhill layer and choose Band_5. Band 5 is displayed in red color gun.
- Click the green box below Cranhill layer and choose Band_4. Band 4 is displayed in green color gun.
- Click the blue box below Cranhill layer and choose Band_3. Band 3 is displayed in blue color gun.
NOTE: Remember to have the bands “flipped” in this way : 5, 4, 3 in RGB.
- Visible bands (1,2,3) show cultural features, roads, urban, etc. better than infrared (IR) bands.
- Visible bands show water details better than the IR bands. For example, the difference between the Fraser (sediment- laden) and Nechako Rivers (clear) – blue and black in the image.
- Infrared bands, on the other hand, show land versus water contrast better than the visible bands, and they do not receive as much atmospheric interference (less haze).
3. Working with Google Earth
Google Earth overlays satellite imagery, aerial photography and GIS information over a 3D model of the Earth. It allows users to search for addresses, enter coordinates, or simply use the mouse to browse to a location. Google Earth enables the user to view satellite images, layers of data provided by Google and by the Internet community at large. Google Earth also has 3D terrain data collected by NASA’s space shuttle and available in the public domain. In addition, Google has provided a layer allowing one to see 3D buildings for some major cities.
- We will use local Linux system for this part of lab.
- Minimze your Osmotar window and back to your Linux system
- Start Google Earth by Applications –> Internet –> Google Earth.
The following diagram describes some of the features available in the main window of Google Earth:
- Search panel – Use this to find places and directions and manage search results.
- Overview map – Use this for an additional perspective of the Earth.
- Hide/Show sidebar – Click this to conceal or the display the side bar (Search, Places and Layers panels).
- Placemark – Click this to add a placemark for a location.
- Polygon – Click this to add a polygon.
- Path – Click this to add a path (line or lines).
- Image Overlay – Click this to add an image overlay on the Earth.
- Measure – Click this to measure a distance or area size.
- Sun – Click this to display sunlight across the landscape.
- Sky – Click this to view stars, constellations, galaxies, planets and the Earth’s moon.
- Email – Click this to email a view or image.
- Print – Click this to print the current view of the Earth.
- Show in Google Maps – Click this to show the current view in Google Maps in your web browser.
- Navigation controls – Use these to zoom, look and move around (see below).
- Layers panel – Use this to display points of interest.
- Places panel – Use this to locate, save, organize and revisit placemarks.
- Add Content – Click this to import exciting content from the KML Gallery
- 3D Viewer – View the globe and its terrain in this window.
- Status bar – View coordinate, elevation, imagery date and streaming status here.
Navigating in Google Earth
Each time you start Google Earth, the Earth appears in the main window. The area that shows the Earth is called the 3D viewer.
Zoom in Using a Placemark
In Google Earth, a placemark is a visual notation that marks a location. Each placemark appears as a pushpin with a label. To zoom to the CN Tower using an existing placemark:
- In the Places Panel, locate the Sightseeing folder. You may need to scroll down to view this folder.
- Expand the Sightseeing folder by clicking + sign beside.
- Double-click the “CN Tower, Canada” place entry. Google Earth zooms to the CN Tower.
Zoom In and Out Using the Mouse
Once you have zoomed in using a placemark, you are ready to zoom in and out using your computer’s mouse. To do this:
- Zoom out from the CN Tower by doing one of the following:
- Scroll the mouse wheel down (toward you) a number of times.
- Hold down the alternate mouse button, drag the mouse up. Do this a number of times.
- Zoom in to the CN Tower again by doing the opposite. In other words, do one of the following:
- Scroll the mouse wheel up (away from you) a number of times.
- Hold down the alternate mouse button, drag the mouse down. Do this a number of times.
Note – If you zoom in far enough, you view point tilts.
Zoom In and Out Using the Navigation Controls
Google Earth navigation controls offer the same type of navigation action that you can achieve with mouse navigation. In addition, you can use the controls to zoom and swoop (perhaps for a perspective on terrain) or to rotate your view. The following image shows the controls and explains their functions.
To view and use the navigation controls, move the cursor over right corner of the 3D viewer. After you start Google Earth and move the cursor over this area, the navigation controls fade from sight when you move the cursor elsewhere. To view these controls again, simply move the cursor over the right corner of the 3D viewer.
Note – If the navigation controls do not appear when you move the cursor over the right corner of the 3D viewer, click View > Show Navigation > Automatically and try again.
To hide or show the compass icon in the 3D viewer, click View > Compass.
For now, just practice zooming in and out with the navigation controls. To do this:
- If the navigation controls do not appear in the right, mouse over the this area. The navigation controls appear.
- Zoom out by clicking the zoom out button
- Zoom in by clicking the zoom in button
You can also click and hold these buttons to zoom continuously.
Note – You can also use the zoom slider to zoom in or out (see diagram above).
Tilting the View
Now you can look at the Earth in three dimensions. To do this, you can tilt your viewpoint so that you can see elevation changes on the Earth’s surface. This feature is fun aspect of Google Earth, particularly when viewing hilly and mountainous terrain.
- Turn on the 3D Buildings layer in Layers panel. This layer contains major buildings in 3D model for most big cities.
Steep terrain of the CN Tower as it appears in Google Earth.
Tilting Using the Mouse
To tilt the viewpoint using your mouse:
- In the Layers panel, be sure the Terrain box is checked (at bottom)
- Zoom to the CN Tower. This exercise works best if you zoom to a viewpoint of about 735m (see Eye alt figure in the bottom right corner of the screen).
- If your mouse has either a middle button or a depressible scroll wheel, tilt the view by depressing the button and moving the mouse up or down.
- If your mouse has a scroll wheel, you can tilt the view by pressing the SHIFT key and scrolling DOWN to tilt the Earth to “top down” view, or scrolling UP to tilt the Earth for horizon view.
Note – The Eye Alt figure at the bottom of the 3D viewer refers to eye altitude (the elevation of your viewpoint).
Tilting Using the Navigation Controls
You can tilt simply by zooming in using upper right corner tool (see the image above). Once you zoom in far enough, Google Earth tilts your view.
The coordinates of the mouse cursor location is showing at lower left corner. By default, it is showing in lat/long.
- You can customize the display by clicking Tools->Options.
- Click 3D View tab, you set how you want to display the coordinates by clicking the radio button in Show Lat/Long box. Give a try to change to UTM display.
Q1. What are UTM coordinates for CN Tower?
4. Creating a UNBC campus map in google earth
In this lab you are going to create a UNBC map in google earth by adding some your own data into the Google Earth, such as campus buildings, place marks, making the building in 3D model, etc.
Searching for a place
First let’s find out our school location in google earth. You can find a place by searching a place name. Type in “University of Northern BC” in the search panel and click the search button. Google Earth will take you to our school location. Here you will be adding more information to google earth to make it specific for UNBC.
First we are going to add some pacemakers for UNBC campus such as building names
Creating a New Placemark
As we are going to add some details to UNBC campus, we will create a folder in Places to hold our information.
- Right-click on My Places->Add->Folder
- Type UNBC for the folder name. The UNBC folder will shows under My Places in the side window.
- Create a sub folder Buildings under UNBC by right-click on UNBC folder->Add->Folder and give Buildings for the name of the folder.
A placemark is a visual notation that marks a location. Each placemark appears as a pushpin with a label. We will first create a placemark for our Library building
- Now create a placemark for Library building under the Buildings folder by right-click on Buildings folder->Add->Placemark.
The New Placemark dialog box appears and a New Placemark icon is centered in the viewer inside a flashing yellow square. Position the placemark. To do this, position the cursor on the placemark until the cursor changes to a pointing finger and drag it to the desired location. The cursor changes to a finger pointing icon to indicate that you can move the placemark. You can also put a place mark by specifying lat/long coordinates.
For instance, if you create a point at: 53°53’32.61″N and 122°48’48.97″W – Where does the place mark land?
The follows are the properties of a place mark
|Name||the name of the placemark|
|Description||including HTML text. Here you give some description of this placemark so that a window will popup to show the description when you move your mouse over on this placemark|
|Style, Color||You can choose a color, scale (size) and opacity for the placemark icon|
|View||Define the observer location|
|Altitude||Choose the height of the placemark as it appears over terrain with a numeric value or the slider. Choose Extend to ground to show the placemark attached to a line anchored to the ground.|
|Icon||Click the icon for the placemark (top right corner of the dialog box) to choose an alternate icon.|
Set the following properties for the new placemark:
- If the placemark’s location is not correct, place your cursor over the placemark (the middle of the placemark) and drag it to the correct location. You need to have the properties window open to make changes.
- Click OK to apply the information you entered in the placemark dialog box.
Your placemark appears in the 3D viewer and as an entry in the selected folder. Once you save this placemark, you can always change its position and properties by right-click on the placemark entry and open its properties.
Now follow the same procedure to create a placemark for each building location under Buildings folder. You can change the properties for the placemark if necessary.
You can save your map into a file which can be opened at anytime from google earth.
- Right-click on UNBC folder->Save Place As. Select KML for the file type.
- Navigate to your local folder under your geog205 and give a name of unbc.kml for the file name. This file can be opened later on at anytime and anywhere with google earth.
Once you are done in creating placemark for each building, in the same way to create a placemark for each parking lot. Here you can change the icon image by clicking on the icon located at upper right in the properties window. An icon selector pops up allowing your to choose different icon image. You can also change the color and size of the placemark in the property window.
- Now create a placemark for parking lot A. Create a subfolder Parkings under UNBC folder by right clicking UNBC and Add->Folder.
- Right-click Parkings and choose Add->Placemark.
- In the property window, click the icon right to the Name box. Here you can choose whatever the icon you think best identifies your features. Click OK to close the icon selector and click OK again to close the property window.
- Now add the rest of parking lots (B, C,D)
You can always change and modify the properties of a placemark by right clicking on the placemark either from the 3D viewer or from the side bar under My Places
Google Earth offers a number of tools that you can use to measure distances and estimate sizes. Depending upon which version of Google Earth you are using, you have access to the following measuring tools
- Measuring with a line or path (all Google Earth versions)
- Measuring with a circle radius or polygon (Google Earth PRO)
To use the measuring tool, click the Ruler button to open Ruler window (Tools menu) to measure length, area, and circumference as follows. In our case, you can only measure line and path inthe free version of Google Earth.
- Position the imagery you want to measure within the 3D viewer and make sure you are viewing the earth from top-down and with terrain turned off (easier to determine your measuring starting and stopping points). Measuring is calculated using the lat/lon coordinates from point to point and does not consider elevation.
- From the Tools menu, select Ruler. The Ruler dialog box appears. Consider moving the dialog box to a region of your screen that doesn’t obstruct the 3D viewer. You can change the measuring units by clicking Tools –> ruler –> set your measuring units.
- Choose the type of shape you want to measure with. All versions of Google Earth can measure with Line or Path. Google Earth PRO users can also measure using a polygon or circle.
- Click in the 3D viewer to set the beginning point for your shape and continue clicking until the line, path, or shape measures the desired region. (For circle, click in the center and drag out to define the circle.)
Measuring a Line is done by placing the starting location and the end location, which make up a single line (one line segment). Path is made up by a number of lines which is done by by placing a number of clicks in the viewer to make up the path. You can always click the Clear button on the Ruler window to clear the line or path to start over.
A red dot indicates the beginning point of your shape, and a yellow line connects to it as you move the mouse. Each additional click adds a new line to the shape, depending upon the tool you chose. The total units for the shape are defined in the Ruler dialog box, and you can choose other units of measure for the existing shape.
Q1. What is the straight distance from the north end of the bus loop to parking lot A ?
Q2. What is the perimeter of parking lot B in nearest meters?
Adding Path and Polygon to the map
You can draw free-form paths and polygons in the 3D viewer and save them in your folder just as you would a placemark. Paths and polygons share all the features of placemark data, including name, description, style view, and location. Once you create a path, you can select it and hit the play tour button
Follow the steps below to draw a path or polygon in the 3D viewer for the University loop and the bus loop (see the image above)
- the thicker line in red is for University campus ring loop and,
- the thinner line is for bus loop
Position the 3D viewer to best contain the region you want to mark. The more detailed your view, the more closely your drawing can follow the land feature.
- Right-click UNBC folder and choose Add->Polygon. The New Path or New Polygon dialog box appears and the cursor changes to a square drawing tool. Enter the properties for your drawing just as you would for any other type of places data. Here we will be drawing the campus ring road.
- Type in Campus Ring Road for the name of the polygon.
- Click Style, Color tab and set Orange for the color (by clicking the square beside Color), 4 for Width and Outlined for Area Color.
- Now leave the property window open and move it aside to make room for drawing area. Move the cursor into the drawing area. You probably notice that the cursor is shown in a square shape.
- Go the the campus ring road to start your drawing and use the following methods to achieve your desired shape:
Free-Form shape – Click once, hold, and drag. The cursor changes to an up-arrow to indicate that you are using free-form mode. As you drag the cursor around the 3D viewer, the outline of the shape follows the path of your cursor. If you are drawing a path, a line appears as a result, and if you are drawing a polygon, a shape evolves from the path of your cursor, always connecting the beginning and ending points.
Regular shape – Click and release. Move the mouse to a new point and click to add additional points. In this mode, the cursor remains a square drawing tool.
You can use a combination of these drawing modes to combine curved edges with straight edges. To transition from a free-form mode to a regular mode, just release the mouse button, position the pointer to a new place, and click. A straight edge is drawn between the last point and the most recent one. Reverse the process to enter free-form drawing mode again.
- Once you are done, click the OK button on the property window. Now you should have the ring road showing in orange color. You can always change and modify the shape and properties of the ring road by right-click and open the property window.
- In the same way, add a path line for the bus loop. Here add a path instead of polygon. Change the properties if necessary.
Now you should have the following contents in your UNBC folder.
- You should have at least three place marks to show the interest spots (you can pick up any three sports)
- Campus Ring Road (Polygon outline, in red)
- UNBC Bus Loop (Path or Polygon, in purple)
Place Marks (pick up three or four sports from the following places)
- Buildings (Placemarks)
- Teaching Lab
- Teaching & Learning
- Research Lab
- Fitness Center
- Daycare Center
- Power Plant
- Residence I
- Residence II
- Northern Sport Center
- Detention Pond
Save your map to unbc.kml under your local folder.
You can save the indevidual layer to a kml file
- Right-click on Campus Ring Road and choose save place as
- Set the file type to KML and save the file as campus_ring_road.kml
5. Adding spatial data to Google Earth from ArcGIS
Exporting ArcGIS layer to Google Earth
Spatial data can be exported to google earth with symbolization and labeling.
- Back to Osmotar server and open ArcMap with a new map file
- Add data: features , boundary (or other layers if desired) from L:\labs\geog205\unbc
- Symbolize boundary based on the Descrip field with the Hollow symbol. The outline should be dot-dash style
- Change symbol size to 7 and color to orange for features layer.
The attribute information can be displayed in google earth by turning on the HTML Popup in the properties.
- Right-click on boundary and open attribute table. Examine the data fields, in most cases, we only want some useful information visible and hide the rest information. This can be done by hiding fields in the table.
- In the attribute table of boundary, click Field tab, you can see all attribute fields here. Click Clear All button located at bottom to uncheck all the fields(hide). Now click the check mark beside the Descrip field to make only this filed visible in the table. Click Apply button to apply the changes.
- Click HTML Popup tab and check “Show content for this layer using HTML Popup Tool”. This will make the attribute information visible in google earth when clicking spatial location. Click Verify button to test.
You can make the popup show as an URL to display the name of the place.
- For Features, make only IDENTIY field visible.
- In the HTML Popup tab, check Show content for this layer using the HTML Popup tool.
- Click the radio button for As a URL and choose IDENTITY for the Field. Click OK.
Export layers to a KML file.
- Click ArcToolbox->Conversion Tools->To KML->Layer to KML
- Choose boundary from the dropdown arrow for Layer.
- Click the button right to Output File and navigate to your local geog205\lab9 folder and save to the file as unbc.kml.
- Set the Layer Output Scale to 20000. Click OK
- In the same way convert features to KML file and save it as unbc_features.kml
Adding KML to Google Earth
Now back to google earth on your local machine
- Right-click UNBC folder and choose Add-> Network Link.
- Give the UNBC campus for the Name and specify the location of unbc.kmz file. Click OK.
- Add unbc_features.kmz to google earth and give the network line name to UNBC Features.
You can click a feature on the map to see the attributes in the table.
- Click a location in Features layer, a window pops up showing the name of the feature. You can examine other layer’s attributes.
You can customize the layer in color, size etc. in the properties window.
- Click the plus sign beside Reserve Land to expand the layer. Right-click on Forest For the World and choose Properties. Here you can change the properties of the layer.
- Click Style, Color tab and change the Line With to 5 to make it thicker. Click OK.
- You can also customize the symbols for each feature. Expend the Features layer and find Tim Horton’s.
- Right-click on Tim Horton’s and open the properties window. In the properties window, click the symbol right beside the name of the feature (Tim Horton’s) to open the symbol selector.
- Choose the CUP symbol and click OK and OK again.
- Save your map to unbc.kml under your localfolder.
6. Convert KML file saved in Google Earth to Shape
- Back to ArcMap or ArcCatalog, in ArcToolbox, click Conversion Tools->From KML-> KML to Layer
- Set unbc_ring_road.kml for Input KML file
- Set K:\geog205\lab9\ for output location and unbc_ring_road for Output data name
- Click OK.
- Add the converted data to ArcMap to view it.
7. Drape your 2D map over Google Earth’s Terrain (optional)
You can drape maps created in ArcMap or other software – as long as it is geo-located (i.e GeoTIFF). You care encouraged to try draping the TIFF file you created in part 2 of last weeks lab. Substitute you map for lab8_google_earth_500.tif used below.
- Navigate to the OSGeo4W Shell in osmotar Start (Shell) –> OSGeo4W –> OSGeo4W Shell
- Right click on the top frame of the shell (Where it says OSGeo4W) –> properties
- turn on quick edit mode
- layout tab –> increase screen buffer size width to 200
- click OK (ignore the warning by clicking OK)
- In the shell paste the following commands (copy from this web page then right click in the shell to paste them)
- k: (changes drive to your k: drive)
- cd geog205\lab9 (change folder to your geog205\lab9 – assuming you called your new folder lab9 earlier in the lab)
- gdal_translate -of KMLSUPEROVERLAY L:\labs\geog205\google_earth\lab8_google_earth_500.tif google_overlay.kmz (creates a file for Google Earth using the map Scott created – you can use your own tif file instead)
- Open the newly created kmz file in google earth