This document provides guidance on enhancing data management and sharing with Google Earth. It outlines methods for converting ArcGIS shapefiles to Google Earth layers (KML files) using free Shape2KML software. Detailed steps are provided on installing Shape2KML, using it to convert shapefiles, and editing the resulting KML files in Google Earth. Advanced editing techniques like adding custom icons, images, and photos are also described. The document aims to promote consistent standards for NETN modules in Google Earth.
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
NE Temperate Network Google Earth Guidance
1. NETN Guide to Enhancing Data Management and
Sharing with Google Earth
2.
3. Enhancing Data Management and Sharing with
Google Earth
Ed Sharron and Adam Kozlowski
National Park Service
Northeast Temperate Network
54 Elm Street
Woodstock, VT 05091
July 2011
U.S. Department of the Interior
National Park Service
Northeast Temperate Network
4. Contents
Page
Purpose............................................................................................................................................ v
Definitions....................................................................................................................................... v
Introduction ..................................................................................................................................... 1
Methods........................................................................................................................................... 2
Converting ArcGIS shapefiles to Google Earth layers ............................................................ 2
Installing Shape2KML software into ArcMap ........................................................................ 2
1. Installing the command. .................................................................................................. 2
Using Shape2KML to Convert a Shapefile ............................................................................. 2
Open Shapefiles in ArcMap ................................................................................................ 2
Altitude ............................................................................................................................... 3
Name and Description......................................................................................................... 4
Style Settings ...................................................................................................................... 4
Set Save Location ............................................................................................................... 5
Viewing and Editing KML in Google Earth ................................................................................... 6
Opening KML.......................................................................................................................... 6
Editing your KML within Google Earth .................................................................................. 7
Change the fill of polygon layers ........................................................................................ 7
Create a Placemark ............................................................................................................. 7
Position the Earth to contain the spot you want to placemark by click-and-
dragging and zooming. Choose any one of the following methods:................................... 7
Advanced Editing of your Google Earth Module ......................................................................... 11
Create custom icon ................................................................................................................ 11
Fixed image overlay .............................................................................................................. 12
Photographs ........................................................................................................................... 13
ii
5. Saving your Work ......................................................................................................................... 15
Organization .......................................................................................................................... 15
Set the Fly To height, position, and angle ............................................................................. 15
Saving your Module .............................................................................................................. 15
Uploading to the Web ................................................................................................................... 15
To Explore Further ........................................................................................................................ 16
Online Help Community........................................................................................................ 16
Troubleshooting ............................................................................................................................ 17
Here are a few common problems you may encounter when using Google Earth and
there solutions. .............................................................................................................................. 17
If getting error message when trying to view PDF’s in GE’s built in browser ................ 17
If getting error message with Google Earth’s built-in browser ........................................ 17
iii
7. Purpose
This guidance document outlines the methods and standards used by Northeast Temperate
Network (NETN) staff when building KMZ modules in Google Earth. Step-by-step instructions
are included on how to create, modify, and post spatial data to the web with or without using
ArcGIS and Google Earth. Following these standards promotes a consistent look and feel of
NETN modules.
This guidance manual makes the following assumptions:
• Users of this manual have basic computer literacy
• Users have Google Earth installed on their computer and a general knowledge of how to
use navigation controls. To download the latest version, go to:
http://www.google.com/earth/index.html
• For the parts that use ArcGIS - the user has ArcMap installed on their computer.
Definitions
KML: 'Keyhole Markup Language' is an XML grammar and file format for modeling and storing
geographic features such as points, lines, images, polygons, and models for display in Google
Earth, Google Maps and other applications. KML’s can be used to share places and information
with other users of these applications.
KMZ: A KMZ file consists of a main KML file and supporting files that are packaged using a
Zip utility into one unit, called an archive. The KMZ file can then be stored and emailed as a
single entity.
SHP: Shapefile - the native file format for ArcGIS.
v
9. Introduction
The free and user friendly Google Earth interface provides a quick and easy way to distribute and
browse spatial data without relying on the costly and complicated ArcGIS platform. Google
Earth allows the overlaying of park data sets onto the latest color imagery and the ability to turn-
back-the-clock to view historical imagery. User can quickly zoom to numerous areas of interest
or parks, view multiple data layers at once, view attributes, take measurements, capture screen
shots, post pictures, and provide maps for citizen scientists all on the web. This procedure walks
through the steps for converting any ArcGIS shapefile to a KML file, post-process it in Google
Earth, and post it to your website. If you have the shapefiles, you can have something basic up
and running for your program in less than a day. Although this procedure focuses mostly on
natural resource data, it is equally applicable to any spatial data (cultural resources, trails,
management areas, partners, law enforcement, etc.)
1
10. Methods
Converting ArcGIS shapefiles to Google Earth layers
These instructions explain one way of using ArcGIS software to convert shapefiles (SHP) to Google
Earth layers (KML). Note that there are many different free and pay tools that can do this, this
method outlines a free and easy option to use called Shape2KML. We recommend researching other
software (Xtools Pro, Export to KML, etc.) to find the one that best suits your needs.
To convert shapefiles to Google Earth layers, you will have to download the free Shape2KML
program available at ESRI’s website (http://arcscripts.esri.com/details.asp?dbid=15698). Once you
have downloaded and unzipped the file, open the Setup folder, and double-click the
“Shape2KML.msi” icon to begin the installation process. If this program does not work or for more
detailed instructions, open the “Shape2KML Readme” folder and open the pdf file contained within.
This will explain how to install and use the tool.
Installing Shape2KML software into ArcMap
This information is also available in the pdf file located in the Shape2KML Readme folder.
Installing the command.
To install the command and add it to an ArcMap
toolbar do the following:
-open the ArcMap Application
-Click Tools Customize
- Go to the Commands Tab
-Click the “shapetokml” command in the Categories
list.
-Drag and drop the Sahpe2kml file from the
Commands list to any toolbar in ArcMap.
-T he command now appears on the toolbar.
Using Shape2KML to Convert a Shapefile
Open Shapefiles in ArcMap
With ArcMap open, click on the “+” sign with the
yellow square behind it (typically found in the
upper toolbar). This will open the Add Data dialog box.
Browse to the folder where the shapefile(s) you want to
convert to Google Earth KML(s) is and open in ArcMap.
With your layer(s) displayed in ArcMap’s left window,
right-click on one and choose Open Attribute Table. The
Shape2KML converter allows you to pick two descriptors
from the attribute table that will appear in the Google Earth
KML. Make note of the two that best describe what you are
trying to show (Note: some shapefiles may not have an
2
11. attribute table or you may not want or need to pick any, in which case, ignore these steps) and
close the attribute table. If you have more than one layer you are converting, do this for all of
them.
Once you have made note
of the attributes you want to
display, click on the Shape2KML icon
you just installed to open its dialog box.
You should see the layer(s) you chose in
the left Select Layers to Export box. You
can either select all layers by clicking the
"Select All" button or select individual
layers by clicking on the square next to
the layer name.
In the Layer dropdown menu in the
upper left, choose one of the layers by
clicking on it. This will allow you to pick
the details of how the KML will be
displayed in Google Earth. The Altitude,
Name and Description selection can be
different for each selected layer. You can
also change some of these setting within
Google Earth itself later.
Altitude
You can select the following altitude
modes (if available):
Clamp to ground: Places the
feature directly on the ground.
Absolute: Places the feature at an
absolute level. This can be taken from a
value field in the Attribute table or
inserted manually.
Relative: Places the feature
relative to ground level. The same as
above, you can get the value from a field
or insert it manually.
3
12. Name and Description
You can choose two descriptors to help
provide more information about your
KML when it is viewed in Google Earth
by choosing options for the Name and
Description drop down boxes.
Use the dropdown menus to choose the
two descriptors you made note of earlier
while viewing the shapefile’s attribute
table. Choose carefully since these
particular settings cannot be changed
once the KML is created (though you can
always re-convert the shapefile again
choosing different settings).
Style Settings
The Style selection allows you to set
properties for the way features will be
shown in Google Earth. Do not worry
too much about these settings because
they can all easily be adjusted within
Google Earth itself.
Fill Color: choose the fill color for
polygons.
Icon Color: choose the color for selected
icon in the ‘Choose Default Icon’
section.
4
13. Set Save Location
To choose the location where your
KML will be saved, click the
"Select..." button and browse to the
appropriate folder. Change the file
name from “Export.kml” to a more
descriptive title in the File name: box.
After setting the options, click the
Create KML button to create the
document at the specified location.
5
14. Viewing and Editing KML in Google Earth
From this point forward - ArcMap is not needed and all edits and creation can be performed
within Google Earth itself
Opening KML
Browse to the location where you saved the KML and double-click it to automatically open it in
Google Earth. Note that the folder structure you set up in Shape2KML should be displayed in the
Places menu in the left of the Google Earth interface. If you decide that you don’t like the way
the folder structure is, the only way to change is to recreate the KML with Shape2KML and
choose different Name and Description options.
6
15. Editing your KML within Google Earth
Change the fill of polygon layers
To change the fill color, line color and opacity of polygon layers,
right click on the layer name in the Places menu and left-click on
Properties. Note that you can usually see the changes you make
update live on the Google Earth map.
Click the Style, Color tab
Under the Lines category. click the Color: box and
choose the color you want from the presented options.
Change the Width: of your lines by clicking the up or
down arrows.
To change the opacity of the lines, use the up or down
arrows next to the Opacity: box or type a percentage directly into the box.
To change the fill color click the Color: box beneath the Area category and choose from
the presented colors. If you have a polygon that you want to be broken up into many
different colors (see the Vegetation Map layers for most NETN park modules), click the
Random check-box and Google Earth will choose the colors for you.
If you do not want a filled polygon, click the arrow next to the box that currently has
Filled + Outlined in it and choose the Outlined option.
If you have a polygon filled in with color, you can change the opacity of the color by
clicking the arrow next to the Opacity box or by typing a percentage directly into the box.
Create a New Placemark
ArcMap is not needed to create new placemarks within Google Earth itself. To do so, position
the Earth to contain the spot you want to placemark by click-and-dragging and zooming. Choose
any one of the following methods:
o Select Placemark from the 'Add' Menu.
7
16. o Click the Placemark icon on the toolbar menu at the top of the screen
The 'New Placemark' dialog box appears and a 'New Placemark' icon is centered in the
viewer inside a flashing yellow square. Position the placemark by moving the cursor over
the placemark until the cursor changes to a pointing finger and click-and-drag it to the
desired location. The cursor changes to a finger pointing icon to indicate that you can
move the placemark.
If you have the exact GPS Latitude and Longitude for you Placemark from a handheld
GPS or other device, you can type them directly into the dialog box.
Latitude and Longitude values can be set using the following notations:
• Decimal Degrees (DDD) - In this notation, decimal precision is set in the 'degree'
coordinate. For example, 49.11675953666N.
• Degrees, Minutes, and Seconds (DMS) - In this notation, decimal precision is set in the
'seconds' coordinate. For example, 49 7'20.06"N.
• Degrees, Minutes with Decimal Seconds (DMM) - In this notation, decimal precision is
set in the 'minutes' coordinate. For example, 49 7.0055722"N. (Here, 20.06 seconds
above is divided by 3600 to get the decimal minute value for 20.06 seconds.)
Latitude and Longitude syntax is specified as follows:
• Numeric Values - Simply separate each coordinate notation with a white space and the
entry will be recognized correctly. For example, you can indicate a DMS notation as: 37
24 23.3. You could indicate a DMM notation as 49 7.0055722.
You can also use the single quote mark (') for minutes and the double quote mark (") for
8
17. seconds, as follows: 49 7'20.06"
Alternatively, you can use the Character Map utility in Windows to copy the degree
symbol and paste it into the Latitude/Longitude input boxes. To do this, select Start - All
Programs - Accessories - System Tools, and then click Character Map. The degree
symbol with Arial font is the second entry past the registration symbol. Click on the
symbol, click the Copy button and paste it into the input box.
• Direction Notation (North/South, East/West)
Use 'N', 'S', 'E', or 'W' to indicate direction. The letter can be entered either upper or lower
case and it can be placed before or after the coordinate value. For example:
N 37 24 23.3 is the same as 37 24 23.3 N
You can also use the minus sign (-) to indicate a westerly or southerly position. When
you use this kind of notation, do not specify a letter symbol. Additionally, you do not
need to use a plus sign (+) to indicate northerly/easterly directions. So, for example this is
a valid entry:
37 25 19.07, -122 05 08.40
The following is NOT a valid entry:
37 25 19.07 N, -122 05 08.40
• Entering Latitude, Longitude Pairs
When entering latitudinal or longitudinal pairs, the first coordinate is interpreted as
latitude unless you use a direction letter to clarify (E or W). For example, you can enter
longitude first as:
122 05 08.40 W 37 25 19.07 N
However, you cannot use the minus sign to enter longitude first:
-122 05 08.40 37 25 19.07
You can separate pair entries with a space, a comma, or a slash:
37.7 N 122.2 W
37.7 N,122.2 W
37.7 N/122.2 W
Note: You can convert UTM coordinates and other measurements to lat and long quickly
and easily by going to the University of Wisconsin website:
http://www.uwgb.edu/dutchs/usefuldata/ConvertUTMNoOZ.HTM
9
18. Set the following properties for the new placemark:
o Name for the placemark
o Description, including HTML text of desired
o Style, Color - Choose a color, scale (size) and opacity for the placemark icon
o View - Choose a position for the placemark. For explanation of terms in this tab,
mouse over each field. Click Snapshot current view to apply the current view
(altitude and camera angle) to this placemark.
o 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.
o (Icon) - Click the icon for the placemark (top right corner of the dialog box) to
choose an alternate icon.
2. 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 later by right-clicking on the
Placemark title and selecting Properties.
10
19. Advanced Editing of your Google Earth Module
Create custom icon
A map uses icons to communicate to its user what
types of data it displays. A good map uses icons that
are intuitive. Although there are many standard icons
made available through Google Earth, there are also
times when a custom icon is preferable. Custom icon
images can come in a variety of formats, though
either PNG’s or GIF’s are recommended because
they allow for transparency of the background (no
filled white box surrounding icon image). Adobe
Photoshop and other image editing software allows
for the saving of images in either format (through the
use of the “Save As” command).
As a general rule, the smaller the file size of the icon
the better. This will allow Google Earth to quickly load and display the icon on the map.
Therefore, the physical size of the icon will also be small. Most icons should fall somewhere
near the vicinity of 150 x 150 pixels, which should put it in the range of a 5 - 10 kilobyte image.
Once the custom icon has been created and you will be sharing it with other on the internet, you
will need to upload it to the server where your website is located. It is recommended that you
create a “Google_Earth” folder within your website structure, and an “icons” folder within that
to have a consistent place to put all custom icons. If you are only using your icon on your local
computer and/or will be emailing your KMZ to others later, just save your icon somewhere on
your local computer/network.
To place your new custom icon on your map, right-click
on the individual layer you want to replace the icon for
(or the entire folder if you want to replace all the icons)
and select Properties. In the Edit Placemark window
click on the image of the icon you want to replace
and in the next window click ‘Add Custom Icon’ in
the lower left. Browse to the location where you
saved your custom icon (either on the web or on your
local computer/network). Click OK and your new
icon should appear in the list of choices. Click on it
and you will see it replace the old icon on the screen.
You can adjust the Scale and Opacity of your icon by
manipulating the up or down arrows at the top of the
Icon dialog box.
11
20. You can also control how the icon will be
viewed by visitors to your map by adjusting
the Altitude tab. If “Clamped to Ground” is
chosen, then the icon will ‘stick’ to the
ground of the map and will be visible no
matter at what height the virtual camera of
Google Earth is at. If you want the icon to
move out of the way as the user zooms in to the map (the same way park labels do on all of
NETN’s Google Earth park modules), then choose the “Reltaive to Ground” option in the drop
down menu and adjust the altitude of the icon to the appropriate height (NETN use 250m for all
park labels).
Fixed image overlay
Being able to show an image on the screen that stays fixed in place even as the user moves
around the map can be useful. Uses include using it like a watermark (e.g. project’s icon) or
providing information about a particular data layer (e.g. legend for a map image overlay). Fixed
image overlays (FIO) must be written directly into the coding of existing KML layers. To add an
FIO to your module, you will need an HTML editor of some kind (e.g. Adobe Dreamweaver,
there are also several free programs available).
If you are working on a KMZ module, you will need to save it as a KML to edit the HTML. To
do this, in Google Earth, right-click on your KMZ
module and select ‘Save Place As’. In the ‘Save as type’
dropdown menu select KML. You may want to create a
new folder to save in as splitting your KMZ into a KML
Click to create new folder will likely create many files that were zipped inside the
KMZ.
Once you’ve saved as a KML, open it in the HTML
editor of your choice. To add the screen overlay, use the
following syntax (note you will need to change <name>
and <Icon> information to your image and to where you
saved it).
<ScreenOverlay>
<name>NPS Logo</name>
<Icon>
<href>http://science.nature.nps.gov/im/units/NETN/googleMaps/images/NPS_logo.png</href>
</Icon>
<overlayXY x="0" y="1" xunits="fraction" yunits="fraction"/>
<screenXY x="0" y="1" xunits="fraction" yunits="fraction"/>
<rotationXY x="0" y="0" xunits="fraction" yunits="fraction"/>
<size x="0.1100000000000001" y="0" xunits="fraction" yunits="fraction"/>
</ScreenOverlay>
12
21. The above coding will give you the result shown below. You will likely need to tweak the x=
and y= coordinates based on the size of your image.
Adding Photographs to Your Placemark Bubble
NETN has chosen to make
photographs accessible from
within its Google Earth
placemarks both as a
thumbnail image and a
hyperlink to a larger format
image. The hyperlinks can
either reference local files on
your computer or files on a
web server. Hyperlinks to
local files can only be seen by
local users of the KMZ file so
their use is limited.
Photographs stored and linked
to KMZ files through a web
server are accessible by a
much wider audience. Either situation is accomplished by inserting HTML code into a
placemark’s Description field, although the examples provided here deal exclusively with linking
to photo files on a web server.
Although photographs are not embedded directly in the KMZ file (but instead linked),
performance can still be slow if photographs are not formatted for use on the web.
13
22. NETN Formatting standards for photographs for use in Google Earth:
1) Open Photoshop
2) Image Image size…
a. Resolution: 72 pixels/inch
b. Width: 1200 pixels; Height: 900 pixels (reverse values for vertical photo)
3) File ‘Save for Web & Devices…’ JPEG format.
4) Rename file by adding the suffix “_web” Save
5) The photograph must now be moved to the appropriate web server so Google Earth
can access it. This is typically the same address where the rest of the organization’s
website building blocks are located.
Path for NETN: Inp2300fcsdepo1imunitsnetngoogleMapsimagesPhotos
Embedding photographs in Google Earth placemarks:
1) Right click on the placemark you wish to add a photograph to and select ‘Properties’.
2) On the Description tab insert the following code:
<br>
Insert description of the photograph (e.g. location, subject, date)<br>
<a href="insert path to photo file that hyperlink points to”"><img src="insert path to
photo file to be viewed as thumbnail image" width="300" height="200"></a>
Click image to see larger version<br>
Example code for NETN:
<br>
East Primrose Brook water quality monitoring site, 2006<br>
<a
href="http://science.nature.nps.gov/im/units/NETN/googleMaps/images/Photos/MOR
R_WQ/MORRSA_2006_web.jpg"><img
src="http://science.nature.nps.gov/im/units/NETN/googleMaps/images/Photos/MOR
R_WQ/MORRSA_2006_web.jpg" width="300" height="200"></a>
Click image to see larger version<br>
14
23. Saving your Work
Organization
It is important to organize your layers and folders in the left-hand Places window in a logical
format. You can add folders to you KMZ by right-clicking the layer you want to further organize
and selecting Add Folder
Type in a title for your folder and make sure
‘Allow this folder to be expanded’ is checked.
Click OK.
Drag the folders and/or layers you want into your
newly created folder. Use the small + or - symbols
next to your folders to expand or compact your
folders. Note that the way you save you module is
the way that it will open and be displayed by
others when it is opened by them.
Set the Fly To height, position, and angle
Google Earth allows you to set how your module will be
zoomed into from outer space when it is opened by a viewer.
To do this, simply position the view of you map by clicking,
dragging, and rotating your view with the mouse and/or
navigation controls in the upper right of the screen.
When you have the map set just how you want it, right click the
highest order folder of you KMZ module and click Snapshot
View.
Saving your Module
When you are ready to save your work, again right-click the highest-order folder of your module
and select ‘Save As’. In the ‘Save file…’window, browse to where you want to save your file,
give it a proper name and make sure you have ‘Kmz’ selected from the ‘Save as type:, drop-
down box.
Uploading to the Web
In order to share your Google Earth module with other on the internet, you must upload the KMZ
to the webserver where your website is stored. You can hyperlink to KMZ files in your website
and they will automatically open in Google Earth if it is installed on the downloader’s computer.
15
24. To Explore Further
Online Help Community
Google Earth has many dedicated users and a large online community that likely has the answer
to any questions you may have about Google Earth or editing KML’s/KMZ’s. A good place to
start is Google official online help website at:
http://code.google.com/apis/kml/
Another option is to just ‘google’ your question/s with the phrase ‘google earth’ enclosed in
quotation marks:
16
25. Troubleshooting
Here are a few common problems you may encounter when using Google Earth and there
solutions.
If getting error message when trying to view PDF’s in GE’s built in browser
Do the following:
Minimize GE and open up Adobe Reader
• First make sure you have the latest version by clicking Help Check for Updates
• Once latest updates have installed click Edit Preferences
• Click ‘Internet’ option in left-hand column and the make sure ‘Display PDF in browser’
is checked
If getting error message with Google Earth’s built-in browser
If you continue getting error message with GE’s browser that automatically slides in from the
right whenever you click on a hyperlink, you can always turn that feature off. To do so:
• In Google Earth, click Tools Options.
• Under the General tab, make sure the ‘Show web results in external browser’ is
unchecked.
From now on hyperlinks will open in you default web browser.
17