guide - google earth enterprise - server help

45
Google Earth Server User Documentation

Upload: lasdjaise

Post on 24-Apr-2015

375 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Guide - Google Earth Enterprise - Server Help

Google Earth ServerUser Documentation

Page 2: Guide - Google Earth Enterprise - Server Help

Copyright © 2005 Google Inc., Copyright © 2005 . All rights reserved. GOOGLE, GOOGLE EARTH, KEYHOLE, and the Google and Keyhole logos and graphics are trademarks or registered trademarks of Google Inc. in the United States and elsewhere. Other trademarks not owned by Google Inc. are the property of their respective owners. The content of this publication is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Google, Inc.

This publication is provided pursuant to and subject to the terms of the Google Earth Fusion license agreements. This publication and the information therein may not be reverse engineered, reproduced, duplicated, modified, altered, disclosed, published, printed or distributed to any third party whatsoever without the express written permission of Google Inc.

Use, reproduction, or disclosure is subject to restrictions set forth in Contract Number 2002*A964800*000 and Contract Number Keyhole-DA001.

Page 3: Guide - Google Earth Enterprise - Server Help

Contents 7

Google Earth ServerUser Documentation

1 Google Earth Server Installation and Setup. . . . . . . . . 131.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

1.1.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14

1.1.2 System Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141.1.2.1 Required . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141.1.2.2 Recommended . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

1.2 Setting Up the Google Earth Server . . . . . . . . . . . . . . . . . . . . 141.2.1 Server Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15

1.2.2 Granting Users Access to the Google Earth Server . . . . . . . . . . . . . . . . .151.2.2.1 Granting User Access. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151.2.2.2 Revoking User Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161.2.2.3 User Access Logs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

1.3 Installing Geocoder and YPSearch Software . . . . . . . . . . . . . . 161.3.1 Setting Up the MySQL Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17

1.3.2 Keyhole Geocoder and GDT Installation. . . . . . . . . . . . . . . . . . . . . . . .171.3.2.1 Installing the Keyhole Geocoder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171.3.2.2 Installing the GDT Geocoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181.3.2.3 Checking for Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181.3.2.4 Testing the Keyhole Geocoder Installation. . . . . . . . . . . . . . . . . . . . . . . . . . 181.3.2.5 Testing the GDT Geocoder Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

1.3.3 Keyhole YPSearch Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191.3.3.1 Installing the YPSearch Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191.3.3.2 Testing For Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201.3.3.3 Testing the YPSearch Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

1.4 KML Search Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221.4.1 Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22

1.4.2 Google Earth Fusion Server Configuration . . . . . . . . . . . . . . . . . . . . . .221.4.2.1 etSearchTab Template Type Description . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

1.4.3 Individual Tab Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .241.4.3.1 UI Customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241.4.3.2 URL Host, Port and Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241.4.3.3 Custom Query Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241.4.3.4 Extra Query Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

1.4.4 Client Response Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25

Page 4: Guide - Google Earth Enterprise - Server Help

Contents8

1.4.4.1 Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

1.4.5 Sample dbRoot Configurations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

1.4.6 KML Server Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

1.5 Searching and Displaying Geo-referenced Information through KML in Google Earth 27

1.5.1 Delivering Geo-referenced Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

1.5.2 Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

1.5.3 Format of the URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

1.5.4 Main Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281.5.4.1 Parsing and Decoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281.5.4.2 Interaction with the Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281.5.4.3 Displaying the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

1.5.5 Annex. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

2 Modifying the Google Earth Server . . . . . . . . . . . . . . 312.1 Editing the Geocoder POI Database . . . . . . . . . . . . . . . . . . . . 31

2.1.1 Adding and Editing Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312.1.1.1 Script options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312.1.1.2 Typical Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322.1.1.3 Manual File:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322.1.1.4 Google Earth Fusion Auto-generated File: . . . . . . . . . . . . . . . . . . . . . . . . 322.1.1.5 Required CSV Input File Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322.1.1.6 Finding a Google Earth Fusion Auto-Generated File . . . . . . . . . . . . . . . . . . 33

2.1.2 Deleting Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332.1.2.1 Script options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332.1.2.2 Typical usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

2.1.3 Removing All Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

2.1.4 The khpublish Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342.1.4.1 Related Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362.1.4.2 Variable Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

3 Keyhole Modules . . . . . . . . . . . . . . . . . . . . . . . . . . 393.1 EarthServer Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

3.1.1 KffFlatfileLogFilePath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

3.1.2 KffFlatfileDatabaseURL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

3.1.3 KffFlatfileHostName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

3.2 Dbrootmerger Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

Page 5: Guide - Google Earth Enterprise - Server Help

Contents 9

3.2.1 KffDbRootMergerURL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41

3.2.2 KffDbRootMergerPostambleMerge. . . . . . . . . . . . . . . . . . . . . . . . . . . .41

3.3 Earthrender Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413.3.1 KffTexturePath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41

3.3.2 KffEarthrenderLogFilePath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41

3.3.3 KffYPServerUrlPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42

3.3.4 KffGeoServerUrlPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42

3.3.5 KffEarthrenderHostName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42

3.4 Keyholehtml Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433.4.1 KffEarthviewerHTMLTemplateDirectory . . . . . . . . . . . . . . . . . . . . . . .43

3.4.2 KffEarthviewerHTMLURL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43

3.4.3 KffEarthviewerStreamServer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43

3.4.4 KffEarthviewerGeocoderServer . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43

3.4.5 KffEarthviewerBorderLayers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44

3.4.6 KffEarthviewerRoadLayers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44

3.4.7 KffEarthviewerHTMLUserAgentListFile. . . . . . . . . . . . . . . . . . . . . . . . .44

3.4.8 KffEarthviewerHTMLUrlAllowListFile . . . . . . . . . . . . . . . . . . . . . . . . .45

Page 6: Guide - Google Earth Enterprise - Server Help

Contents10

Page 7: Guide - Google Earth Enterprise - Server Help

Contents 11

Page 8: Guide - Google Earth Enterprise - Server Help

Contents12

Page 9: Guide - Google Earth Enterprise - Server Help

13Google, Inc - Google Earth Server

1 Google Earth Server Installation and Setup

Welcome to the Google Earth Server™ documentation. This document contains instructions for installing and managing the following Google Earth Server elements:

• The Google Earth Server itself

• User access to the Google Earth Server

• The Keyhole Geocoder and the Keyhole YPSearch servers

With the Geocoder and YPSearch components, you can use your own servers for address, Point of Interest (POI), and YP searches. With these servers, you can compute the latitude and longitude for addresses and cities, and you can search for businesses in a given area by name. You can also edit the Keyhole Geocoder to maintain your own database of POIs.

• Setting up an ASP configuration for delivery of your vector (points, lines) information on top of the standard Keyhole imagery, terrain, and vector data.

• The Keyhole Apache module directives that you might need for special configuration settings for your server, such as authentication settings and virtual server setup.

Note: “Keyhole” is the legacy brandname of Google Earth products. Occasionally, the Keyhole name appears in sections of this document and in portions of these products.

1.1 IntroductionThe Keyhole Server software uses the patent-pending Keyhole EarthStream™ technology to provide highly interactive access to extremely large 3D geospatial databases. This means that the server can host a single copy of a database made up of imagery, terrain, GIS, point data, and line data. The server can be accessed over the Internet or an intranet and users can use the Keyhole client to “fly-through” the database without having to replicate the data locally. This innovation means that, for the first time, personnel throughout an organization can enjoy extremely responsive interaction with a remotely-hosted geospatial database.

The Google Earth Server supports a robust encryption algorithm for data as well as industry standard x509 certificates and LDAP directory services for user authentication and access control. This means that critical data is protected and access can be limited to valid users.

Page 10: Guide - Google Earth Enterprise - Server Help

14 Google Earth ServerGoogle Earth Server Installation and Setup

1.1.1 Features• Data encryption

• Up to 150 concurrent users per server

• Uses HTTP for transport avoiding firewall issues and leveraging network caching

• Designed, tested, and proven support for load-balanced configurations supporting many thousands of concurrent users

• Geocoding software – supports street level geocoding

• Authentication module – supports x509 certificates or proprietary authentication scheme as well as LDAP director services for access control

• HTML component – enables server to deliver static 2D maps to browser. Includes automatic support for thin client browsers such as PocketPC

1.1.2 System RequirementsYour system must meet the required requirements in order to run the Google Earth Server software.

1.1.2.1 Required

• SuSE Linux Professional (versions 8.2 and 9.2) or SLES 8 or 9

1.1.2.2 Recommended

• Total concurrent users: 150 per server

• Total supportable users: 3,000 users per server

• Dual Intel Xeon 2.4 GHz (or greater)

• 1 GB main memory

• 500 GB hard disk ( >= 7200 rpm)

• DVD drive

• 10/100 Network Interface Card (NIC)

• .5-20 Terabyte network-attached storage device

• NFS protocol for file sharing

1.2 Setting Up the Google Earth ServerThe following instructions explain how to install a Google Earth Server on your system with user access. Specifically, it covers:

• Server Installation

Page 11: Guide - Google Earth Enterprise - Server Help

15Setting Up the Google Earth Server

• Granting Users Access to the Google Earth ServerThese steps assume that Red Hat Linux is installed and running on the system. Once you have set up the Google Earth Server, you can follow the instructions for setting up the Geocoder and YPSearch software, covered in “Installing Geocoder and YPSearch Software” on page 16.

1.2.1 Server InstallationServer setup is done on a Linux system (see “System Requirements” on page 14). The following is a step-by-step procedure for installing the Google Earth Server software:

1. Before installation, make sure network settings have been configured on the Linux system, especially settings such as host name, which should be the full DNS name (i.e., myserver.mycompany.com).

2. Login as root.

3. Insert the CD labeled into the CD drive of the computer.

4. From a command prompt, type ./InstallKeyholeServer.

The software is then installed on the system. You can verify installation by typingrpm -q KeyholeServer.

1.2.2 Granting Users Access to the Google Earth ServerThis section covers instructions for adding and removing user access to the Google Earth Server. This allows Keyhole windows client to connect to the server to receive the streaming imagery to their computer.

1.2.2.1 Granting User AccessThe Google Earth Server authentication system is completely controlled through one text file, which is located in the following directory:

/var/www/auth/khpasswd

Each line of the text file contains information about an individual user, which includes the following:

• Username

The name of the user. An e-mail address is often used for this field.

• Password

The password for the user. This is NOT encrypted and is clear text.

• License Key

The License Key of the user. This field is composed of only numbers and upper case characters. A Passport ID can be up to a maximum of 15 characters.

Note: The letters O and I are excluded from the valid set.

Page 12: Guide - Google Earth Enterprise - Server Help

16 Google Earth ServerGoogle Earth Server Installation and Setup

Each field should be separated by a single space. An example of an entry follows:

jsmith password 12345ABCDE56789

By adding a line with the user information as described above, the user is given access to the Google Earth Server. The exact procedure for adding a user follows:

1. Open up the /var/www/auth/khpasswd file in a text editor.

2. Add user name, password and License Key for the user at the end of the file. For example:

jsmith 67abcde 12345ABCDE56789

In this example, jsmith is the user name of the user, 67abcde is the password for the user, and 12345ABCDE56789 is the License Key of the user.

3. Close and save the /var/www/auth/khpasswd file.

This gives a user access to the Google Earth Server.

1.2.2.2 Revoking User AccessAccess to the Google Earth Server can also be denied to a user by removing the specific entry from the khpasswd text file or by commenting the line out using the # character. The exact procedure for removing access to a given user follows:

1. Open up the /var/www/auth/khpasswd file in a text editor.

2. Find the line in the file that contains the user name of the user.

3. Either completely remove the line from the file, or comment the line out by placing a # at the beginning of the line. For example:

#jsmith 67abcde 12345ABCDE56789

4. Save the /var/www/auth/khpasswd file.

1.2.2.3 User Access LogsThe access logs for the Google Earth Server authentication system are saved in the following location:

/usr/keyhole/khhttpd/logs/khauth.log

The log file contains entries for successful/failed activations and logins, and provides a history of all the users who have tried to access the Google Earth Server.

1.3 Installing Geocoder and YPSearch SoftwareOnce the Google Earth Server is installed with user access, you can install the Geocoder and YPSearch software. This section covers the following tasks:

Page 13: Guide - Google Earth Enterprise - Server Help

17Installing Geocoder and YPSearch Software

• Setting Up the MySQL database

• Setting Up the Keyhole Apache Server

• Installing the Keyhole Geocoder Modules

• Installing the YPSearch Modules

1.3.1 Setting Up the MySQL DatabaseBefore installing the Keyhole Geocoder and YPSearch servers, you must make sure that your system has a MySQL database installed and activated.

1. Log in as the root user.

2. Check to see that a MySQL database is installed on the system using the following command:rpm -qa | grep mysql

3. If no results are returned, install the MySQL database. The rest of the installation process requires the following MySQL RPMs:

• mysql

• mysql-devel

• mysql-server

• mysql-client (SuSE operating systems only)

• mysql-shared (SuSE operating systems only)

4. Set the MySQL database to restart when the system is rebooted:chkconfig mysqld on (Redhat)chkconfig mysql on (SuSE)

5. Start the MySQL database.service mysqld start (Redhat)/etc/init.d/mysql start (SuSE only)

1.3.2 Keyhole Geocoder and GDT InstallationAfter you have installed and activated the MySQL database and started the Apache web server (see the steps under “Installing Geocoder and YPSearch Software” on page 16), you are ready to install the Keyhole Geocoder, and optionally the GDT Geocoder. This section covers how to install the Geocoder(s), as well as how to check for errors and test the geocoder and address option for successful installation.

1.3.2.1 Installing the Keyhole GeocoderFollow these steps to install the Geocoder.

1. Log in as the root user, if you are not already.

Page 14: Guide - Google Earth Enterprise - Server Help

18 Google Earth ServerGoogle Earth Server Installation and Setup

2. Insert the CD labeled Keyhole Geocoder into the CDROM drive of the machine and change to the CDROM drive:cd <cdrom-directory> In this example, <cdrom-directory> is the directory where the CDROM is mounted.

3. Set up the Geocoder using the appropriate command.

• If the root user of MySQL has a password, type:

./InstallKeyholeGeocoder -mysql_root_pw <mysql root password>

In this example, <mysql root password> is the MySQL root user password.

• If the root user of MySQL does not have a password, type:

./InstallKeyholeGeocoder

The software is installed on the system. This script takes about 5 minutes to run.

1.3.2.2 Installing the GDT GeocoderFollow these steps to install the GDT Geocoder for US streets and addresses.

Note: You must have WINE installed on your Linux workstation before you can install the GDT Geocoder. In addition, a GDT license is required.

1. Log in as the root user, if you are not already.

2. Insert the DVD labeled GDT Geocoder into the CDROM drive of the machine and change to the CDROM drive:cd <cdrom-directory> In this example, <cdrom-directory> is the directory where the DVD is mounted.

3. Set up the GDT Geocoder using the appropriate command.

./InstallKeyholeGDTGeocoder

The software is installed on the system. This will take approximately 30 minutes to run.

1.3.2.3 Checking for ErrorsIf either geocoder setup fails, an error prints to standard out.

1.3.2.4 Testing the Keyhole Geocoder InstallationFollow these steps to test for a successful Geocoder installation.

1. Open a web browser window on the system.

2. Enter http://localhost/geocoder/geocoder.dll?CSZ=Paris&CNT=France in the locator bar at the top of the browser.

Page 15: Guide - Google Earth Enterprise - Server Help

19Installing Geocoder and YPSearch Software

In the browser, you should see something similar to the following:

You can also test the Geocoder installation in the Keyhole client by entering the terms Paris and France in the correct fields of the address input and clicking on the GO button. If the Geocoder has been successfully installed, the Keyhole client will “fly” to Paris.

1.3.2.5 Testing the GDT Geocoder InstallationIf you have installed the GDT Geocoder, you can verify a successful installation by doing the following:

1. Open a web browser window on the system.

2. Enter http://localhost/geocoder/geocoder.dll?ADR=1100A+L'Avenida&CSZ=Mountain+View,+CA in the browser bar at the top of the browser.

3. The browser display will look similar to the one pictured above, but with the following information: [geocodeResponse] { [latitude] 37.413230 [longitude] -122.071289 [altitude] 0.0001 [placeName] "1100 L'Avenida" [status] "Okay." }

1.3.3 Keyhole YPSearch InstallationAfter you have installed and activated the MySQL database and started the Keyhole Apache web server, you are ready to install the Keyhole YPSearch software. This section covers how to install the YPSearch, as well as how to test the YPSearch server for successful installation.

1.3.3.1 Installing the YPSearch SoftwareFollow these steps to install the YPSearch software.

1. Log in as the root user.

2. Insert the CD labeled Keyhole YPSearch into the CDROM drive of the computer and type cd <cdrom-directory> where <cdrom-directory> is the directory where the CDROM is mounted.

Page 16: Guide - Google Earth Enterprise - Server Help

20 Google Earth ServerGoogle Earth Server Installation and Setup

3. Set up the YPSearch software using the appropriate command.

a. If the root user of MySQL has a password, type: ./InstallKeyholeYPSearch -mysql_root_pw <mysql root password>

In this example, <mysql root password> is the MySQL root user password.

b. If the root user of MySQL does not have a password, type:

./InstallKeyholeYPSearch

1.3.3.2 Testing For ErrorsIf the YPSearch setup fails, an error prints to standard out.

Page 17: Guide - Google Earth Enterprise - Server Help

21Installing Geocoder and YPSearch Software

1.3.3.3 Testing the YPSearch InstallationTest for a successful YPSearch installation by doing the following:

1. Open a web browser window on the system and enter the following URL in the locator input window at the top of the browser:

http://localhost/cgi-bin/ypsearch_beta?lat=37.73&long=-122.46&dlat=1

In the browser, you should see something similar to the following:

Note: If the above results are not seen, watch the end of your Keyhole Apache error log file for clues and try again.

tail -f /usr/keyhole/khhttpd/logs/khhttpd_error_log

Page 18: Guide - Google Earth Enterprise - Server Help

22 Google Earth ServerGoogle Earth Server Installation and Setup

1.4 KML Search InterfaceThis section describes the KML search interface in Keyhole EC clients as of version 2.3. It is intended for Keyhole EC customers who want to deploy a custom KML server. Readers of this document should be familiar with the following topics:

HTTP, Keyhole Fusion (knowledge of the ETA format and dbRoot configuration) and KML. Sample uses of this feature could be an ArcSDE or WFS gateway, or an MLS search interface.

1.4.1 SynopsisThe KML search interface enables Enterprise Customers to extend the search capabilities of the Google Earth client. Through a list of settings downloaded by the Google Earth EC client at boot time, the search interface can be customized. This allows, for example, to query a 3rd party database for KML content from within the Keyhole EC client. In this document, "user" designates a person using the Keyhole EC client.

1.4.2 Google Earth Fusion Server ConfigurationThe Google Earth client has three separate search tabs (geocoder, local search and driving directions). Each of these tabs is configurable through dbRoot, which the client downloads from the database when the user logs in.

A new template type (etSearchTab) has been added to dbRoot to allow configuring each of the three search tabs.

1.4.2.1 etSearchTab Template Type DescriptionHere is the declaration of the etSearchTab type in ETA format:

<etTemplate> [<etSearchTab>] { <etBool> [visible] true <etString> [label] "" <etString> [host] "" <etInt> [port] 80 <etBool> [secure] false <etString> [path] "/" <etString> [inputLabel1] "" <etString> [inputQueryVerb1] "" <etString> [inputLabel2] "" <etString> [inputQueryVerb2] ""}

Page 19: Guide - Google Earth Enterprise - Server Help

23KML Search Interface

The following table describes each individual field.

Field nameField typedescriptiondefault value

visible<etBool>controls visibility of tab. Set to false to hide tab. If set to false,

other fields in this template are ignored.true

label<etString>

Label to display as name of tab. This is mandatory if the tab is visible.

""

host

<etString>

Server to contact to run search when the user presses the search button. If convenient, the string can also specify an IP address rather than a host name.

""port<etInt>HTTP port to use to connect to KML server.80

secure<etBool>

Set to true to make secure (HTTPS) connections to this server. Otherwise, HTTP will be used.

falsepath<etString>URL path to send the query on KML server."/"

inputLabel1<etString>

Label of first input box. This has no impact on the search itself and is provided for UI customization purposes. It should be set to something meaningful. Set to empty to hide first input box in the client UI,

""inputQueryVerb1<etString>

Page 20: Guide - Google Earth Enterprise - Server Help

24 Google Earth ServerGoogle Earth Server Installation and Setup

Query verb attached to first input box. Set to empty to hide first input box.

""inputLabel2<etString>Label of second input box. Functions the same way as inputLabel1.

""inputQueryVerb2<etString>

Query verb attached to second input box. Functions the same way as inputQueryVerb1.

""

1.4.3 Individual Tab ConfigurationAll 3 search tabs are accessible through the export.search meta-structure

The following table describes how to access and configure each individual tab in the client. The type of these three variables is <etSearchTab>.

1.4.3.1 UI CustomizationEach tab that is customized through dbRoot can either be hidden (in which case it won't be displayed in the client UI and therefore will be unavailable to users) or renamed through the label field in etSearchTab

1.4.3.2 URL Host, Port and PathEach customized search tab that is not hidden must be associated with a server name. Optionally, a port and path can be specified, as well as a "secure" flag. By default, the Keyhole EC client will make an HTTP connection to the specified server on port 80 and use "/" as the URL path for each KML search request. If the "secure" flag is set, the client will make an HTTPS connection to the server.

1.4.3.3 Custom Query ParametersFor each search tab, a maximum number of one input box can be configured. The input box can be labeled (in order to let the user know what the effect of that input box is) or hidden by

tab index variable name in dbRoot initial contents

1 export.search.tab1 Fly To search tab

2 export.search.tab2 Local Search tab

3 export.search.tab3 Directions search tab

Page 21: Guide - Google Earth Enterprise - Server Help

25KML Search Interface

giving it an empty label and empty query verb. Each visible input box must be associated with a non-empty query verb that the client will use to formulate a query to the KML server. When the user runs a search from a customized tab, the Keyhole EC client URL-escapes the content of each input box (spaces are translated to %20, commas to %2C and so on) and assigns it to the specified query verb.

1.4.3.4 Extra Query ParametersFor every search performed in a customized search tab, the Keyhole client will add query parameters to specify its current view extents in lat/lon space as well as the type of data it expects in return.

⟨ll=latitude,longitude&spn=deltaLatitude,deltaLongitude - longitude and latitude indicate the position in the center of the screen, deltaLongitude, deltaLatitude indicate the width and height of the view extents in longitude/latitude space. All angle values are in degrees. This allows the KML server to know the approximate extents of the view in lat/lon space when the user is performing a particular search.

·output=kml - specifies that output type required by the client is KML. This enables the KML server to identify Keyhole clients versus other types of clients.

1.4.4 Client Response HandlingUpon success, the client will parse the response content and populate the Search window (just below the three search tabs) with the KML elements that were returned. When returning multiple features for one search, it is strongly recommended to combine them in a <Folder> tag to group them together. After populating the Search window with the KML elements, the client flies to the view of the top-level element in the KML

1.4.4.1 Error HandlingIf the Google Earthy client receives empty KML or an error response code (HTTP 4xx/5xx), it will display an appropriate error message.

Custom error messages are not yet supported in Google Earth (i.e. the server cannot return content that will cause the client to display a customized error message).

Malformed KML (including unescaped '&' and/or ',') will cause the client to display the "Your search produced no results" dialog box.

1.4.5 Sample dbRoot ConfigurationsThe first example does the following:

• Hide the second and third search tab.

• Rename the first search tab to "Custom Searches"

• Connects the first search tab to http://search.company.com/kmlsearch?

Page 22: Guide - Google Earth Enterprise - Server Help

26 Google Earth ServerGoogle Earth Server Installation and Setup

• Connects the first input box in that tab to query verb "query" and labels the first input box "Search my server for:"

• Hides the second input box

Here is how it can be done in dbRoot:

<etStruct> [export.searchTabs]{ <etSearchTab> [tab1] { true "Custom Searches" "search.company.com" 80 false "/kmlsearch" "Search my server for:" "query" "" "" } <etSearchTab> [tab2] { false } <etSearchTab> [tab3] { false }}

Note: These changes should be added to the end of /usr/share/keyhole/dbroottool/postamble.v5.base.

Let's assume the user enters "My house" in the first input box and clicks the search button. If the center of the view is 122 W 37.7 N and the extents are 0.5 degrees both in longitude and latitude, here is the request that client will send:

http://search.company.com/kmlsearch?query=My%20%House&ll=-37.7,122.0&spn=0.5,0.5&output=kml

1.4.6 KML Server RequirementsWhen responding to a request from the Keyhole client, a KML server must follow a certain set of rules so that the client can correctly interpret responses.

• Upon success, the server must return a response code of HTTP 200 and set the response's content-type to "application/vnd.google-earth.kml+xml", which is the official MIME type for KML. The body of the response must contain valid KML data, including the xml declaration header (<?xml version="1.0" encoding="UTF-8"?>)

Page 23: Guide - Google Earth Enterprise - Server Help

27Searching and Displaying Geo-referenced Information through KML in Google Earth

• The Keyhole client handles all HTTP error codes and displays an appropriate error message for each code.

• To signal an invalid search or a search that returned no result (due to a typing error, for instance), it is also possible to return an empty response with a return code of 200 (HTTP OK). In this case, the client will display a message box signaling the search returned no result.

1.5 Searching and Displaying Geo-referenced Information through KML in Google EarthThe section describes how you can use a Google Earth client to query the contents of a database and display geo-referenced data. The database will store a set of locations with differents attributes. The client will be able to see those locations through the Google earth interface.

When the client request data from the server, that data will depend on the position of the camera and in certain cases the values of other parameters

1.5.1 Delivering Geo-referenced DataThere are 3 major ways of delivering the georeferenced data:

• KML/KMZ File: A KML/KMZ file stored in a web server and available for download. When the user clicks on it, the browser will run the Google Earth client which opens the file. As the content of the file can not change, this method doesn't allow interactivity.

• Network Links: Thanks to the Network Link feature, the client can make automatic viewport-dependant queries. Network links can be published on any web site and downloaded into Google Earth with a regular web browser.

• Search Tab (EC version): The customizable search tab in the EC version allows the addition of two parameters in the search query of the Google Earth client. In the top right of the Google Earth Client, the user can fill in two lines. When he clicks on the 'search' button, the results of the search are displayed.

1.5.2 Web ServicesThe infrastructure needed to support the queries from the client is a server running:

• a database

• a web application

The server hosts a web application which delivers content to the client depending on the URL it has received. This web application parses the URL and extracts the bounding box (that's to say the region the client is looking at) and other parameters (EC Search tab). The application then connects to a database and sends a SQL statement where it specifies condition for the elements it wants (for example, all the elements must be inside the Bounding box) The

Page 24: Guide - Google Earth Enterprise - Server Help

28 Google Earth ServerGoogle Earth Server Installation and Setup

database answers the reply with a set of elements. The web application displays the result in the kml format and sends it to the client following the HTTP protocol.

1.5.3 Format of the URLDepending on the solution we choose, the format of the URL will be different.

Network Links:

http://path_to_your_server_script?BBOX=longitude_west, latitude_south, longitude_east, latitude_north

For example, it might look as follows if the request was made while the user was looking down on San Francisco:

http://path_to_your_server_script?BBOX=-122.497790,37.730385,-122.380087,37.812331

Search tab:

http://path_to_your_server_script?ll=latitude_center,longitude_center&spn=latitude_height,longitude_width&tabvariable1=foo&tabvariable2=bar

If the user was looking at San Francisco:

http://path_to_your_server_script?

1.5.4 Main StepsSteps to deal with a client request include:

• Parsing and decoding

• Interaction with the database

• Displaying the results

1.5.4.1 Parsing and DecodingThe spatial extent of the viewer is passed in the URL as comma-delimited key-value pairings.

It is specified as part of the URL in the following format:

ll=latitude_center,longitude_center&spn=latitude_span,longitude_span&tabvariable1=foo&tabvariable2=bar

Where the latitude_center and longitude_center define the center of the Google Earth client's current view and the latitude_width and longitude_width define the total respective width and heights, in decimal degrees, from this center.

1.5.4.2 Interaction with the Database

1. Connection to the database

Page 25: Guide - Google Earth Enterprise - Server Help

29Searching and Displaying Geo-referenced Information through KML in Google Earth

2. Creation of the query . The query for the database is based on the SQL language.

a) SELECT + values needed + FROM + name of the table

b) WHERE x < foo AND x > bar.. , the same for y

c) other conditions if wanted

d) limitations : ex limit 10

3. Execution of the query. The database executes the query and replies by sending the results.

4. Closing of the connection with the database.

We must close the connection after storing the results in a variable.

1.5.4.3 Displaying the Results

1. 200 OK code

200 OK code must be sent to the client. Then we define the content-type (MIME type) of the data we are going to deliver. In that case, it's "application/vnd.google-earth.kml+xml".

2. Formatting the results

First, we print the header of the document:

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

<kml xmlns='http://www.google.com/earth/kml/2'>

The result from the database is a table and each row represents an element. We explore that table, and for each row we print a placemark object, whose attributes

Page 26: Guide - Google Earth Enterprise - Server Help

30 Google Earth ServerGoogle Earth Server Installation and Setup

depend on the values in the different columns. All of the placemarks are placed in a folder.

<Folder> THE RESULTS ARE DISPLAYED AS PLACEMARKS IN A FOLDER

<description>Craiglist search DESCRIPTION OF OUR SEARCH

<name>Craiglist</name> --> NAME OF THE FOLDER

There are other ways of displaying the information: Go to the kml description page for further details.

For example, we can give a value for the name, description and of course coordinates.

<Placemark> --> EACH ROW IS A PLACEMARK

<name> NAME OF THE PLACEMARK </name> --> NAME OF THE PLACE

<description> DESCRIPTION </description> --> TEXT IN THE BUBBLE (SUPPORTS HTML FORMAT)

<Point>

<coordinates>-93.25778505728366,44.97374024117024,275.8362385661844</coordinates> --> COORDINATES (LON,LAT,ELEVATION)

</Point>

</Placemark>

1.5.5 AnnexNetwork links: http://www.keyhole.com/kml/kml_tut.html#network_links

KML features: http://www.keyhole.com/kml/kml_doc.html

Page 27: Guide - Google Earth Enterprise - Server Help

31Google, Inc - Google Earth Server

2 Modifying the Google Earth Server

2.1 Editing the Geocoder POI DatabaseThe Geocoder Point of Interest (POI) database allows those with access to the Geocoder database to manipulate entries in the database such that a Keyhole client user can enter a point of interest in the address locator and be taken to that location.

For example, an oil company might create a layer that contains all the points for its wells. A person using the client could enter the name of the well into the address locator to go to that exact location.

You can add, edit, or delete entries in the Geocoder POI database or clear all entries by using one of the following scripts:

• khg_add_entries

• khg_delete_entries

• khg_clear_all

The name of the script indicates its action. The following scripts must be used on the same server that the Keyhole Geocoder is installed. In addition, the three scripts reside in /usr/bin, so there is no need to precede the script name with its path.

2.1.1 Adding and Editing EntriesTo add or edit entries in the POI database, use

khg_add_entries

If a location name already exists in the database, it is replaced with the new values. For instance, if San Francisco had previously been added to the database, and a new entry for SAN FRANCISCO is used to update the database, its values overwrite the old values.

Note: Updates to the database are not case sensitive.

2.1.1.1 Script options

• -help

Prints out the options available for use.

Page 28: Guide - Google Earth Enterprise - Server Help

32 Google Earth ServerModifying the Google Earth Server

• -input_file

The CSV (Comma-Separated Values) file that contains the entries to be added to the POI database. This file can be a manually created CSV file (see “Required CSV Input File Fields” on page 32) or an auto-generated CSV file created by Fusion (see “Finding a Google Earth Fusion Auto‐Generated File” on page 33).

• -bad_file

The file the program will fill with problematic entries from the input file. After running khg_add_entries, you can check this file to see which lines were not accepted by the program. Later, you can edit them and try entering them into the database again.

2.1.1.2 Typical UsageThe following usage examples show how to add entries to a manually created file, and how to add entries to a file that has been auto-generated from Google Earth Fusion.

2.1.1.3 Manual File:

khg_add_entries -input_file oil_wells.csv -bad_file /tmp/oil_wells.bad

2.1.1.4 Google Earth Fusion Auto-generated File:

khg_add_entries -input_file testproject.v1.layer.5.geocode -bad_file /tmp/oil_wells.bad

2.1.1.5 Required CSV Input File FieldsThe following table lists each required field for the input file. No header fields are allowed in the input file.

Table 1: Input File Fields

Field Name Description

Location Name This field contains the information the user enters in the address locator form in the Keyhole client. The string match must be exact, but the search is case insensitive.

Latitude The latitude for the POI.

Longitude The longitude for the POI.

Unit The viewing level at which the POI should be displayed. Optional: If this is not provided, the default level is applied.

Type Describes the type of data in the Unit field. Currently, this is defaulted to level and level is the only allowed value.

Page 29: Guide - Google Earth Enterprise - Server Help

33Editing the Geocoder POI Database

2.1.1.6 Finding a Google Earth Fusion Auto-Generated FileGoogle Earth Fusion automatically generates a CSV file for each layer each time a vector project is successfully built.

You can use the following query to retrieve a list of filenames of all the CSV files for a particular project version:

khquery --geocoding <vector project> [version]

These files can be found in your publish directory.

A human readable text file, <project name>.geocode.xref, lists the name of the layer and the corresponding file name to be used as the input file. The naming convention used for this text file is:

<layer name>: <project name>.<version number>.layer.<layer id>.geocode

For example, if you have a layer for oil wells, you might have a Google Earth Fusion-generated file such as:

Oil Wells: testproject.v1.layer.5.geocode

2.1.2 Deleting EntriesTo delete specific entries from the POI database, use

khg_delete_entries

If the name exists in the database, it will be removed. The script reports the number of entries deleted from the database.

Note: When deleting entries from the database, be aware that entry names are not case sensitive.

2.1.2.1 Script options

• -help

Prints out the options available for use.

• -input_file

The CSV file that contains the entries to be deleted from the POI database. This can be a manually created CSV file or an auto-generated CSV file created by Google Earth Fusion.

• -bad_file

A report of problematic entries from the input file. After running khg_delete_entries, you can check this file to see which lines were not accepted. You can edit them and try removing them from the database again.

Page 30: Guide - Google Earth Enterprise - Server Help

34 Google Earth ServerModifying the Google Earth Server

2.1.2.2 Typical usage

khg_delete_entries -input_file oil_wells_del.csv -bad_file /tmp/oil_wells_del.bad

In this example, the file oil_wells_del.csv contains the entries that need to be deleted from the database. For information on the fields needed in the input file, see “Required CSV Input File Fields” on page 32.

Tip: Copy lines directly from the file used to input the locations into the database, without deleting the fields after the first one. The khg_delete_entries script will ignore all fields after the first one. Do not put a header line in the file.

2.1.3 Removing All EntriesTo remove all entries from the POI database, use

khg_clear_all

2.1.4 The khpublish CommandThe khpublish tool manages the publication of Google Earth databases on the Google Earth Server. It is similar to chkconfig and is composed of a collection of variables that you set for the Google Earth Server™ (see “Variable Definitions” on page 37 and see the usage below). The tool is able to manage both the main database and virtual databases served on a Google Earth Server.

khpublish [-hostname] [--list]khpublish [-hostname] [--copy]khpublish [-hostname] [--servers]khpublish [-hostname] [--undo]khpublish [-hostname] [--publish] [force] khpublish [-hostname] [variablename] {value|default|undo}

Parameters:

• -hostname

Optional. The host name of the server can be specified through the initial argument with the host name prefaced by a dash (-). For example:

khpublish -mydomain.mycompany.com --list

If no host name is given, the host name is assumed to be the Google Earth Server itself, which can also be referenced by the option -khdefault. For example, the

Page 31: Guide - Google Earth Enterprise - Server Help

35Editing the Geocoder POI Database

following command lists the current server variables set for the default Google Earth Server:

khpublish -khdefault --list

Note: Only a single host name can be supplied with the khpublish command. If you have a single change to make over multiple virtual servers, you will have to specify the appropriate command for each affected server.

• --list

Optional. This parameter lists the current values of all the variables set for the Google Earth Server. It is used in the following manner:

khpublish -mydomain.mycompany.com --list

This prints out the list of variables and their current settings for the indicated server. The list has three main columns: the name of the variable, the type of the variable, and the current values. See “Variable Definitions” on page 37. To set the definition for a specific variable, use the name of the variable followed by its definition.

• --servers

If you want to see all the current virtual servers, use the --servers option:

khpublish --servers

• --undo or undo

You can individually undo all changes you make to variable definitions for a given server with the --undo option:

khpublish -khdefault --undo

To undo changes to an individual variable, use the undo parameter next to the option:

khpublish -mydomain.mycompany.com khauthentication undo

• --publish

To publish a given server configuration, use the --publish command:

khpublish -mydomain.mycompany.com --publish

The database is published only if changes have been made and built. However, if the server configuration files have changes that you want to administer—such as the database root—you can force a publish by using the force option:

khpublish -mydomain.mycompany.com --publish force

Page 32: Guide - Google Earth Enterprise - Server Help

36 Google Earth ServerModifying the Google Earth Server

• --copy

Optional. If you want to copy one server's configuration to another, use the --copy option. Set the from server by setting the current host name using the dash (-) flag, and set the destination server by giving a parameter after the command:

khpublish -test.mydomain.com --copy myserver.mydomain.com

khpublish -test.mydomain.com --copy khdefault

Note: You can copy a virtual server configuration to the main server by using khdefault as your destination server name.

• variablename {value | default | undo}

Optional. To set the value of a variable, type in the name of the variable following by the value in the argument string:

khpublish -mydomain.mycompany.com khauthentication off

If you have multiple values to set for a given variable, such as khdatabase.index, you will need to surround the values in quotes. For example:

khpublish -mydomain.mycompany.com khdatabase.index "/data/kffdb.imagery /data/kffdb.terrain"

You can also return a variable value to its default state by setting it to default:

khpublish -khdefault khauthentication default

Finally, you can undo the value of a variable by using the undo option:

khpublish khauthentication undo

2.1.4.1 Related Configuration FilesAll files concerning khpublish, such as dbRoot files and postambles, are stored in:

/var/lib/keyhole/khpublish

When a database is published, it modifies three files:

• /var/lib/keyhole/dbroot.conf

• /var/lib/keyhole/keyhole.conf

• /var/lib/keyhole/virtualstream.conf

Page 33: Guide - Google Earth Enterprise - Server Help

37Editing the Geocoder POI Database

2.1.4.2 Variable DefinitionsThe following table lists the configurable server variables that you can set with the khpublish command.

Name Type Description

khpublishversion integer The version of the published Google Earth database.

khdbrootversion integer The version of the dbRoot file. Default is 4.

khauthentication on/off Enables/disables Google Earth authentication, i.e. login, registration.

khpostamble.base string Sets the path for the base postamble file for the dbRoot.The default is /usr/share/keyhole/dbroottool/postamble.base

khdatabase.index string The list of Google Earth databases to be published.

khdatabase.post string The list of postamble files associated with the published databases.

khcopyright.imagery string The path for the XML file containing the copyright information for the imagery.

khserverrestart string This is the command for restarting the server. The default is: "/usr/bin/restart_httpd"

geoserver.host string This sets the host name of the geocoding server.

geoserver.port string This sets the port of the geocoding server.

ypserver.host string This sets the host name of the YP server.

ypserver.port string This sets the port of the YP server.

authserver.host string This sets the host name of the authentication server.

authserver.port string This sets the port of the authentication server.

Page 34: Guide - Google Earth Enterprise - Server Help

38 Google Earth ServerModifying the Google Earth Server

Page 35: Guide - Google Earth Enterprise - Server Help

39Google, Inc - Google Earth Server

3 Keyhole Modules

This section describes the directives for the Keyhole modules available for the Google Earth Server. You can find these directives in the /etc/httpd/conf/Keyhole.conf file. Required directives are indicated. For optional directives, the default values are indicated in the usage examples.

The directives are broken down into two main categories:

• Google Earth client directives

These are the directives that affect the interaction between the Google Earth client applications and the Google Earth Server. Modifications to these directives will impact end users accessing your database via the Google Earth client. The directives are the EarthServer directives (mod_flatfile), and the Dbrootmerger directives (mod_dbrootmerger).

• Keyhole HTML directives

These directives affect the interaction between the Keyhole HTML viewer and the Google Earth Server™. Modifications to these directives will impact end users accessing your database using the Keyhole HTML browser in a standard web browser (or other device that supports the http protocol). The directives are the EarthRender directives (mod_earthrender) and the Keyholehtml directives (mod_keyholehtml).

Note: Many of these settings can be controlled using the khpublish tool, which is documented in “The khpublish Command” on page 34 of Modifying the Google Earth Server.

3.1 EarthServer DirectivesThe following directives for mod_flatfile are optional and control location, size, and names for various Google Earth flat file entries, including locations for log files, URL settings for an ASP server setup, and host name settings.

Page 36: Guide - Google Earth Enterprise - Server Help

40 Google Earth ServerKeyhole Modules

3.1.1 KffFlatfileLogFilePathThis directive sets the path for flat file logs and can be used for debugging or tracking access to the Google Earth Server. This directive decrypts all client cookie requests to the Google Earth Server so that you can determine server access based on registration key and timestamp.

3.1.2 KffFlatfileDatabaseURL This directive supplies a list of flatfile database URLs that are used for setting up ASP servers where clients accessing your ASP server receive standard Keyhole imagery, terrain, and vector data along with your own vector data incorporated into the 3D viewer.

Note: Typically ASP setup is done by Google personnel, but refer to “Editing the Geocoder POI Database” on page 31 of Modifying the Google Earth Server for more information.

3.1.3 KffFlatfileHostName This directive sets the hostname (primary domain name) of your server and is usually done automatically when the Google Earth Server is first installed on your system. However, if the host name of the server changes, you can modify it with this directive.

3.2 Dbrootmerger DirectivesThe mod_dbrootmerger directives are optional and manage the initialization file for the Google Earth database for Keyhole Pro/NV/LT clients. This module is mainly used when setting up virtual servers with the Google Earth Server software.

Values Example

User-specified path. KffFlatfileLogFilePath /var/www/logs/kffdb_log_ff

Values Example

User-specified URLs.

KffFlatfileDatabaseURL stream.keyhole.com

Values Example

User-specified name. KffFlatfileHostName stream.company.com

Page 37: Guide - Google Earth Enterprise - Server Help

41Earthrender Directives

3.2.1 KffDbRootMergerURL This directive supplies a list of flatfile database URLs that are used for setting up ASP servers where clients accessing your ASP server receive standard Google Earth imagery, terrain, and vector data along with your own vector data incorporated into the 3D viewer.

Note: Typically ASP setup is done by Google personnel. This directive is used in conjunction with “KffFlatfileDatabaseURL” on page 40.

3.2.2 KffDbRootMergerPostambleMergeOptional. Flag for whether to merge the postambles. See above

3.3 Earthrender DirectivesThe mod_earthrender directives relate to those components necessary for implementing Keyhole HTML access to the Google Earth Server. Specifically, the module is involved in rendering earth imagery, YP listings, and other elements associated with the imagery database for access from Keyhole HTML.

3.3.1 KffTexturePath A required setting that indicates the path for the texture image files such as placemark icons and other images. You can add additional icons to this directory.

3.3.2 KffEarthrenderLogFilePath An optional setting, this directive sets the path for flat file logs and can be used for debugging or tracking access to the Google Earth Server from Keyhole HTML clients. This directive

Values Example

User-specified URL. KffDbRootMergerURL stream.earthviewer.com

Values Example

On, Off KffDbRootMergerPostambleMerge OnKffDbRootMergerPostambleMerge Off

Values Example

User-specified path. KffTexturePath /var/www/textures/

Page 38: Guide - Google Earth Enterprise - Server Help

42 Google Earth ServerKeyhole Modules

decrypts all Keyhole HTML cookie requests to the Google Earth Server so that you can determine server access based on registration key and timestamp.

3.3.3 KffYPServerUrlPath An optional directive used to set the URL for the YPSearch server. You can use this value to change both the DNS of the YPSearch server as well as the format of the query that gets passed into the server from the HTML viewer.

Note: If you change the format of the query, you must understand how the YPSearch CGI scripts function in order to support the change.

3.3.4 KffGeoServerUrlPath An optional directive used to set the URL for the geocoding server. You can use this value to change both the DNS of the geocoding server as well as the format of the query that gets passed into the server from the HTML viewer.

Note: If you change the format of the query, you must understand how the geocoding CGI scripts function in order to support the change.

3.3.5 KffEarthrenderHostNameThis optional directive sets the hostname (primary domain name) of your server for Keyhole HTML access. This is done automatically when the Google Earth Server is first installed on your system. However, if the host name of the server changes, you can modify it with this directive.

Values Example

User-specified path. KffEarthrenderLogFilePath /var/log/httpd/kffdb_log_er

Values Example

User-specified paths. KffYPServerUrlPath http://yp.keyhole.com/cgi-bin/ypsearch_beta?long=%lf&lat=%lf&dlat=%lf&dlong=%lf&name=%s

Values Example

User-specified paths. KffGeoServerUrlPath geo.company.com/cgi-bin/geocoder

Values Example

User-specified name. KffEarthrenderHostName stream.company.com

Page 39: Guide - Google Earth Enterprise - Server Help

43Keyholehtml Directives

3.4 Keyholehtml Directives

The mod_keyholehtml module processes HTML code that contains Google Earth-specific tags to enable easy creation of web-based User Interfaces to the database. It handles much of the math and navigation elements for the client.

3.4.1 KffEarthviewerHTMLTemplateDirectory Required. The path for the Keyhole HTML template files. This is the directory where all templates exist, including your custom templates.

3.4.2 KffEarthviewerHTMLURLOptional. The URL for the Keyhole HTML module. This must be your server name.

3.4.3 KffEarthviewerStreamServerOptional. The URL for the Google Earth Server. The default will be whatever your machine name is upon installation of Keyhole 2 Server software. For most cases, the stream server and the Keyhole HTML server will be the same.

3.4.4 KffEarthviewerGeocoderServer Optional. The URL for the geocoding server. If this directive is not set, the server tries to connect to the geocoder running on localhost. See “KffGeoServerUrlPath” on page 42.

Values Example

User-specified path. KffEarthviewerHTMLTemplateDirectory /var/www/evtemplates

Values Example

User-specified URL. KffEarthviewerHTMLURL servername.company.com

Values Example

User-specified URL. KffEarthviewerStreamServer servername.company.com

Values Example

User-specified URL. KffEarthviewerGeocoderServer geo.company.com

Page 40: Guide - Google Earth Enterprise - Server Help

44 Google Earth ServerKeyhole Modules

3.4.5 KffEarthviewerBorderLayers Optional. Specifies settings for border layers as viewed in the Keyhole HTML client.

Note: In this and the following directive, the value is specified in layers. For example, 000054055060 in the example below is actually 000, 054, 055, and 060 concatenated together. So, if you decide not to view border layer 055 (maybe these are county borders), you would set the value to 000054060. The layer values themselves are dependent on the Google Earth Server database that you have created. The specification of these borders corresponds to those borders in the Keyhole HTML client that appear when the user selects the Borders check box to view boundary information.

3.4.6 KffEarthviewerRoadLayersOptional. Specifies settings for the road layers. See “KffEarthviewerBorderLayers” on page 44. Also, for this directive, the specification of these layers corresponds to the roads in the Keyhole HTML viewer that appear when the user selects the Roads check box to view road information.

3.4.7 KffEarthviewerHTMLUserAgentListFileOptional. The path for the user agent list file. In this directory, an XML file defines a browser/template pair. In this way, a particular template or display style corresponds to a specific browser, such as Mozilla or a cell phone browser. In this way, you can modify the user agent list to define templates that support cell phone display.

Values Example

User-specified value.Default = 000054055060

KffEarthviewerBorderLayers 000054055060

Values Example

User-specified value.Default = 001003

KffEarthviewerRoadLayers 001003

Values Example

User-specified path.

KffEarthviewerHTMLUserAgentListFile /var/www/evtemplates/useragentlist

Page 41: Guide - Google Earth Enterprise - Server Help

45Keyholehtml Directives

3.4.8 KffEarthviewerHTMLUrlAllowListFile Optional. The path for the URL allow list file, a text file with tags denoting each URL from which the Keyhole HTML viewer is allowed to receive template files. Using this directive, you can host your template files on a remote server.

The tag format is as follows:

<EVT_ALLOW_URL url="http://server.company.com">

Values Example

User-specified path. KffEarthviewerHTMLUrlAllowListFile /var/www/evtemplates/urlallowlist

Page 42: Guide - Google Earth Enterprise - Server Help

46 Google Earth ServerKeyhole Modules

Page 43: Guide - Google Earth Enterprise - Server Help

47

Index

Aaccess

adding 15revoking 16

address optionGDT Geocoder 19

auto-generated files, POI 33

Bborders

configuring 44

Ccommands

khpublish 34

Ddatabase

URL list 41, 42URLs 40

databasesserver variables for publishing 37

directives, requiredKffEarthviewerHTMLTemplateDirectory 43

KffTexturePath 41domain name, primary 40, 42

Eearth imagery

rendering 41

GGDT Geocoder

address option 19

Geocodererror checking 18installing 16, 17testing installation 18URL for server 42, 43

Iimagery access 45input file

auto-generated 33POI entries 32

installationGeocoder 16, 17server 15YPSearch 16, 19

KKeyhole 2 Fusion

auto-generated files 33Keyhole client

template file path 43Keyhole HTML

URL for 43Keyhole Server

features 14installation 15introduction 13setup 14URL for 43user access 15

Page 44: Guide - Google Earth Enterprise - Server Help

Index48

KffDbRootMergerPostambleMerge 41KffDbRootMergerURL 41KffEarthrenderDatabaseURL 42KffEarthrenderHostName 42KffEarthviewerBorderLayers 44KffEarthviewerGeocoderServer 43KffEarthviewerHTMLTemplateDirectory 43

KffEarthviewerHTMLURL 43KffEarthviewerHTMLUrlAlloListfile 45KffEarthviewerHTMLUserAgentListFile 44KffEarthviewerRoadLayers 44KffEarthviewerStreamServer 43KffFlatfileDatabaseURL 40KffFlatfileHostName 40KffFlatfileLogFilePath 40KffGeoServerUrlPath 42KffTexturePath 41KffYPServerUrlPath 42khg_add_entries 31khg_delete_entries 33

Llog files

path location for 40

Mmod_dbrootmerger

KffDbRootMergerPostambleMerge 41KffDbRootMergerURL 41

mod_earthrenderKffEarthrenderDatabaseURL 42KffEarthrenderHostName 42KffGeoServerUrlPath 42KffTexturePath 41KffYPServerUrlPath 42

mod_earthviewerhtmlKffEarthviewerBorderLayers 44KffEarthviewerGeocoderServer 43KffEarthviewerHTMLUrlAlloListfile 45KffEarthviewerHTMLUserAgentListFile 44

KffEarthviewerRoadLayers 44mod_flatfile

KffFlatfileDatabaseURL 40KffFlatfileHostName 40KffFlatfileLogFilePath 40

mod_keyholehtmlKffEarthviewerHTMLTemplateDirectory 43

KffEarthviewerHTMLURL 43KffEarthviewerStreamServer 43

modulesapache, for Keyhole 39mod_dbrootmerger 40mod_earthrender 41mod_flatfile 39mod_keyholehtml 43

MySQLsetup 17

PPOI

adding entries 31case sensitivity for entries 31clearing all entries 34deleting entries 33editing entries 31required input file fields 32

Point of Interestsee also POI 31database for 31

Rroad data

configuring 44

Ssystem requirements 14

Ttexture images

location 41

UURL allow list, path for 45user agent

path for list file 44users

access 15access logs 16adding 15

Page 45: Guide - Google Earth Enterprise - Server Help

49Index

removing 16

YYPSearch

errors 20

installing 16, 19server URL 42testing installation 21