DOC

# EXERCISE 1 Creating a KML file from spreadsheet.doc

By Lynn Perkins,2014-04-02 23:49
16 views 0
EXERCISE 1 Creating a KML file from spreadsheet.doc

NCSSM AP Environmental Sciences

InstructorDr. Schmalbeck

Guest SpeakerKatherine Wright

January 22, 2007

EXERCISE 1: Creating a KML file from spreadsheet.

KML (Keyhole Markup Language) tags that will run the Google Earth file. 2) Open Google Earth (GE), Tools / Options / Under “Show Long/Lat”, select Degrees / OK

3) In the “Fly To” field, enter a location, select the magnifying glass icon

4) Add a place mark (select the push pin icon)

; Copy and paste longitude and latitude, remember to remove the degrees symbol

; Longitude and Latitude values must be provided in Decimal Degrees format for

Google Earth. To convert Degrees/Minutes/Seconds to Decimal Degrees you

may use the calculator provided at the following web site:

http://www.anycalculator.com/decimaltodegree.htm

; To complete the “LONG,LAT” column, select the fx to open the function menu

; Under “or select category”, pull down to “All”

; Under “select a function” chose “concatenate”

; Select OK

; Highlight longitude

; Hit tab

; Enter a comma

; Hit tab

; Highlight latitude

; Select OK

; Use the “CONCATENATE” formula (a text function) to fill in the “LONG,LAT”

column.

; Longitude values need to be negativeWhy?

6) Open a blank Notepad document and copy and paste the following code:

<?xml version="1.0" encoding="UTF-8"?>

<Folder>

<name>INSERT NAME OF FILE HERE</name>

Name your file what you would like it to be called within Google Earth. 7) Highlight and copy all filled cells within your Excel document. 8) Paste cells below the code you just inserted into the Notepad document. 9) Under the Format menu, select Wordwrap

10) Complete the Notepad document with the following two lines of code:

</Folder>

</kml>

11) Save the Notepad document with a .kml extension.

13) Open your new KML file!

14) In GE, your place markers will be stored in the “Temporary Places” folder

15) Right-click your place marker, select “Properties”

17) Right-click your place marker, select “Snapshot View” (GE will remember your snapshot

and zoom here each time you go to this place marker)

EXERCISE 2: Creating Lines and Polygons in Google Earth. 1) In GE, create place markers at the joints of your polygon. If you wish to make a triangle,

create three; for a square, four …

formatted with KML tags that will run the Google Earth file. 3) Enter data in the spreadsheet according to the headings

; Complete the “Insert name here” and “Insert description here” columns

; In the “Insert Coordinates” column, select the fx to open the function menu

; Under “select a function” choose “concatenate”

; Select “OK”

; In the “Text1” field, enter the longitude for place mark number 1 (remember to omit

the degrees symbol)

; Hit tab

; Enter a comma

; Hit tab

; Enter the latitude

; Hit tab

; Enter a comma

; Hit tab

; Enter a zero (as in the numeral)

; Hit tab

; Enter a space

; Hit tab

4) Repeat with the additional points in your polygon, ending with the first point to close the

shape

6) Open a blank Notepad document and copy and paste the following code:

<?xml version="1.0" encoding="UTF-8"?>

<Document>

<name>INSERT NAME OF FILE HERE</name>

<open>1</open>

<Style id="sn_icon35">

<IconStyle id="khIconStyle611_copy26">

<Icon>

</Icon>

</IconStyle>

<LineStyle id="khLineStyle614_copy26">

<color>bf7f00ff</color>

<antialias>0</antialias>

<width>6</width>

</LineStyle>

<PolyStyle id="khPolyStyle615_copy26">

<fill>0</fill>

</PolyStyle>

</Style>

<Style id="khStyle610">

<IconStyle id="khIconStyle611">

<Icon>

</Icon>

</IconStyle>

<LineStyle id="khLineStyle614">

<color>bf7f00ff</color>

<antialias>0</antialias>

<width>6</width>

</LineStyle>

<PolyStyle id="khPolyStyle615">

<color>ff00aaff</color>

<fill>0</fill>

</PolyStyle>

</Style>

Name your file what you would like it to be called within Google Earth.

7) In Excel, highlight and copy all filled cells.

8) In Notepad, paste cells below the code you just inserted.

9) Complete the Notepad document with the following two lines of code:

</Document>

</kml>

10) Save the Notepad document with a .kml extension.

11) Open your new KML file!

EXERCISE 3: Overlays

1) Open the JPEG image “NCSSM sw” to get an idea of the scale you will be working with.

2) In Google Earth, zoom into NCSSM until it is approximately the same scale as the JPEG

image.

3) Right click the Add Image Overlay icon on the Google Earth toolbar.

4) Name the overlay, and then browse to the JPEG image.

5) Adjust the transparency of the overlay image so that you can see the satellite image

below.

6) Adjust the size of the overlay image so that major landmarks on both images match up

(exstreets).

7) In the dialogue box, readjust the transparency so that the overlay is opaque.

Transparency can be adjusted later on the Places menu on the left of the screen.

USEFUL WEBSITES

Quick Reference Guides

KML Reference:

HTML Reference chart (scroll down): http://www.web-source.net/html_codes_chart.htm