Guide - Google Earth Enterprise - Server Help

Download as pdf or txt
Download as pdf or txt
You are on page 1of 45
At a glance
Powered by AI
The document provides instructions for installing and setting up the Google Earth Server.

It provides documentation on installing and configuring the Google Earth Server and its components.

The main sections covered include installing the server, geocoding software, YPSearch, and configuring the different modules.

Google Earth Server User Documentation

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.

Google Earth Server User Documentation


1 Google Earth Server Installation and Setup. . . . . . . . . 13
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.1.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14 1.1.2 System Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
1.1.2.1 1.1.2.2 Required . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Recommended . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

1.2

Setting Up the Google Earth Server . . . . . . . . . . . . . . . . . . . . 14


1.2.1 Server Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 1.2.2 Granting Users Access to the Google Earth Server . . . . . . . . . . . . . . . . .15
1.2.2.1 1.2.2.2 1.2.2.3 Granting User Access. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Revoking User Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 User Access Logs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

1.3

Installing Geocoder and YPSearch Software . . . . . . . . . . . . . . 16


1.3.1 Setting Up the MySQL Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 1.3.2 Keyhole Geocoder and GDT Installation. . . . . . . . . . . . . . . . . . . . . . . .17
1.3.2.1 1.3.2.2 1.3.2.3 1.3.2.4 1.3.2.5 1.3.3.1 1.3.3.2 1.3.3.3 Installing the Keyhole Geocoder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Installing the GDT Geocoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Checking for Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Testing the Keyhole Geocoder Installation. . . . . . . . . . . . . . . . . . . . . . . . . . 18 Testing the GDT Geocoder Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Installing the YPSearch Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Testing For Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Testing the YPSearch Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

1.3.3 Keyhole YPSearch Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19

1.4

KML Search Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22


1.4.1 Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 1.4.2 Google Earth Fusion Server Configuration . . . . . . . . . . . . . . . . . . . . . .22
1.4.2.1 1.4.3.1 1.4.3.2 1.4.3.3 1.4.3.4 etSearchTab Template Type Description . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 UI Customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 URL Host, Port and Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Custom Query Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Extra Query Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

1.4.3 Individual Tab Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24

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


Contents 7

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. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.5.4.1 1.5.4.2 1.5.4.3 Parsing and Decoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Interaction with the Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Displaying the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

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

2 Modifying the Google Earth Server . . . . . . . . . . . . . . 31


2.1 Editing the Geocoder POI Database . . . . . . . . . . . . . . . . . . . . 31
2.1.1 Adding and Editing Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.1.1.1 2.1.1.2 2.1.1.3 2.1.1.4 2.1.1.5 2.1.1.6 2.1.2.1 2.1.2.2 Script options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Typical Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manual File:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Google Earth Fusion Auto-generated File: . . . . . . . . . . . . . . . . . . . . . . . . Required CSV Input File Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Finding a Google Earth Fusion Auto-Generated File . . . . . . . . . . . . . . . . . . 31 32 32 32 32 33

2.1.2 Deleting Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33


Script options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Typical usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

2.1.3 Removing All Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2.1.4 The khpublish Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34


2.1.4.1 2.1.4.2 Related Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Variable Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

3 Keyhole Modules . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.1 EarthServer Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.1.1 KffFlatfileLogFilePath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.1.2 KffFlatfileDatabaseURL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.1.3 KffFlatfileHostName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

3.2
8

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

Contents

3.2.1 KffDbRootMergerURL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41 3.2.2 KffDbRootMergerPostambleMerge. . . . . . . . . . . . . . . . . . . . . . . . . . . .41

3.3

Earthrender Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.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

Contents

10

Contents

Contents

11

12

Contents

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

Introduction

The 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.

Google, Inc - Google Earth Server

13

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 Requirements


Your 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 Server

The following instructions explain how to install a Google Earth Server on your system with user access. Specifically, it covers: ServerInstallation
14 Google Earth Server Google Earth Server Installation and Setup

GrantingUsersAccesstotheGoogleEarthServer These 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 InstallingGeocoderandYPSearchSoftware on page 16.

1.2.1 Server Installation


Server setup is done on a Linux system (see SystemRequirements 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 typing rpm -q KeyholeServer.

1.2.2 Granting Users Access to the Google Earth Server


This 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 Access


The 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.

Setting Up the Google Earth Server

15

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 Access


Access 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 Logs


The 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 Software

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

16

Google Earth Server Google Earth Server Installation and Setup

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 Database


Before 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 Installation


After you have installed and activated the MySQL database and started the Apache web server (see the steps under InstallingGeocoderandYPSearchSoftware 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 Geocoder


Follow these steps to install the Geocoder. 1. Log in as the root user, if you are not already.
Installing Geocoder and YPSearch Software 17

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 Geocoder


Follow 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 Errors


If either geocoder setup fails, an error prints to standard out.

1.3.2.4 Testing the Keyhole Geocoder Installation


Follow 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.

18

Google Earth Server Google Earth Server Installation and Setup

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 Installation


If 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 Installation


After 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 Software


Follow 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.

Installing Geocoder and YPSearch Software

19

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. If the root user of MySQL does not have a password, type: ./InstallKeyholeYPSearch

b.

1.3.3.2 Testing For Errors


If the YPSearch setup fails, an error prints to standard out.

20

Google Earth Server Google Earth Server Installation and Setup

1.3.3.3 Testing the YPSearch Installation


Test 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

Installing Geocoder and YPSearch Software

21

1.4

KML Search Interface

This 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 Synopsis
The 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 Configuration


The 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 Description


Here 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] "" }

22

Google Earth Server Google Earth Server Installation and Setup

The following table describes each individual field.


Field name Field type description default 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.
false path <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>

KML Search Interface

23

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 Configuration


All 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>.

tab index 1 2 3

variable name in dbRoot export.search.tab1 export.search.tab2 export.search.tab3

initial contents Fly To search tab Local Search tab Directions search tab

1.4.3.1 UI Customization
Each 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 Path


Each 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 Parameters


For 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
24 Google Earth Server Google Earth Server Installation and Setup

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 Parameters


For 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 Handling


Upon 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 Handling


If 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 Configurations


The 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?

KML Search Interface

25

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 Requirements


When 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"?>)

26

Google Earth Server Google Earth Server Installation and Setup

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 Earth
The 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 Data


There 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 Services


The 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
Searching and Displaying Geo-referenced Information through KML in Google Earth 27

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 URL


Depending 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_hei ght,longitude_width&tabvariable1=foo&tabvariable2=bar If the user was looking at San Francisco: http://path_to_your_server_script?

1.5.4 Main Steps


Steps to deal with a client request include: Parsing and decoding Interaction with the database Displaying the results

1.5.4.1 Parsing and Decoding


The 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

28

Google Earth Server Google Earth Server Installation and Setup

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.googleearth.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

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

29

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</coordina tes> --> COORDINATES (LON,LAT,ELEVATION) </Point> </Placemark>

1.5.5 Annex
Network links: http://www.keyhole.com/kml/kml_tut.html#network_links KML features: http://www.keyhole.com/kml/kml_doc.html

30

Google Earth Server Google Earth Server Installation and Setup

2
2.1

Modifying the Google Earth Server


Editing the Geocoder POI Database

The 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 Entries


To 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.

Google, Inc - Google Earth Server

31

-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 RequiredCSVInput FileFields on page 32) or an auto-generated CSV file created by Fusion (see Finding aGoogleEarthFusionAutoGeneratedFile 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 Usage


The 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 Fields


The 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 Location Name Description 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. The latitude for the POI. The longitude for the POI. The viewing level at which the POI should be displayed. Optional: If this is not provided, the default level is applied. Describes the type of data in the Unit field. Currently, this is defaulted to level and level is the only allowed value.

Latitude Longitude Unit Type

32

Google Earth Server Modifying the Google Earth Server

2.1.1.6 Finding a Google Earth Fusion Auto-Generated File


Google 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 Entries


To 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.

Editing the Geocoder POI Database

33

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 RequiredCSV InputFileFields 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 Entries


To remove all entries from the POI database, use
khg_clear_all

2.1.4 The khpublish Command


The 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 VariableDefinitions 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

34

Google Earth Server Modifying the Google Earth Server

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 VariableDefinitions 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 administersuch as the database rootyou can force a publish by using the force option:
khpublish -mydomain.mycompany.com --publish force

Editing the Geocoder POI Database

35

--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 Files


All 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

36

Google Earth Server Modifying the Google Earth Server

2.1.4.2 Variable Definitions


The following table lists the configurable server variables that you can set with the khpublish command.
Name khpublishversion khdbrootversion khauthentication khpostamble.base Type integer integer on/off string Description The version of the published Google Earth database. The version of the dbRoot file. Default is 4. Enables/disables Google Earth authentication, i.e. login, registration. Sets the path for the base postamble file for the dbRoot. The default is /usr/share/keyhole/dbroottool/postamble.base The list of Google Earth databases to be published. The list of postamble files associated with the published databases. The path for the XML file containing the copyright information for the imagery. This is the command for restarting the server. The default is: "/usr/bin/restart_httpd" This sets the host name of the geocoding server. This sets the port of the geocoding server. This sets the host name of the YP server. This sets the port of the YP server. This sets the host name of the authentication server. This sets the port of the authentication server.

khdatabase.index khdatabase.post khcopyright.imagery khserverrestart geoserver.host geoserver.port ypserver.host ypserver.port authserver.host authserver.port

string string string string string string string string string string

Editing the Geocoder POI Database

37

38

Google Earth Server Modifying the Google Earth Server

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 ThekhpublishCommand on page 34 of Modifying the Google Earth Server.

3.1

EarthServer Directives

The 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.

Google, Inc - Google Earth Server

39

3.1.1 KffFlatfileLogFilePath
This 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.
Values User-specified path. Example KffFlatfileLogFilePath /var/www/logs/kffdb_log_ff

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 Editingthe
GeocoderPOIDatabase on page 31 of Modifying the Google Earth Server for more information.
Values User-specified URLs. Example KffFlatfileDatabaseURL stream.keyhole.com

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.
Values User-specified name. Example KffFlatfileHostName stream.company.com

3.2

Dbrootmerger Directives

The 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.

40

Google Earth Server Keyhole Modules

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.
Values User-specified URL. Example KffDbRootMergerURL stream.earthviewer.com

3.2.2 KffDbRootMergerPostambleMerge
Optional. Flag for whether to merge the postambles. See above
Values On, Off Example KffDbRootMergerPostambleMerge On KffDbRootMergerPostambleMerge Off

3.3

Earthrender Directives

The 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.
Values User-specified path. Example KffTexturePath /var/www/textures/

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

Earthrender Directives

41

decrypts all Keyhole HTML cookie requests to the Google Earth Server so that you can determine server access based on registration key and timestamp.
Values User-specified path. Example KffEarthrenderLogFilePath /var/log/httpd/kffdb_log_er

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.
Values User-specified paths. Example KffYPServerUrlPath http://yp.keyhole.com/cgibin/ypsearch_beta?long=%lf&lat=%lf&dlat=%lf&dlong=%lf&name=%s

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.
Values User-specified paths. Example KffGeoServerUrlPath geo.company.com/cgi-bin/geocoder

3.3.5 KffEarthrenderHostName
This 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 User-specified name. Example KffEarthrenderHostName stream.company.com

42

Google Earth Server Keyhole Modules

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.
Values User-specified path. Example KffEarthviewerHTMLTemplateDirectory /var/www/evtemplates

3.4.2 KffEarthviewerHTMLURL
Optional. The URL for the Keyhole HTML module. This must be your server name.
Values User-specified URL. Example KffEarthviewerHTMLURL servername.company.com

3.4.3 KffEarthviewerStreamServer
Optional. 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.
Values User-specified URL. Example KffEarthviewerStreamServer servername.company.com

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 User-specified URL. Example KffEarthviewerGeocoderServer geo.company.com

Keyholehtml Directives

43

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.
Values User-specified value. Default = 000054055060 Example KffEarthviewerBorderLayers 000054055060

3.4.6 KffEarthviewerRoadLayers
Optional. 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.
Values User-specified value. Default = 001003 Example KffEarthviewerRoadLayers 001003

3.4.7 KffEarthviewerHTMLUserAgentListFile
Optional. 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 Userspecified path. Example KffEarthviewerHTMLUserAgentListFile /var/www/evtemplates/useragentlist

44

Google Earth Server Keyhole Modules

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 User-specified path. Example KffEarthviewerHTMLUrlAllowListFile /var/www/evtemplates/urlallowlist

Keyholehtml Directives

45

46

Google Earth Server Keyhole Modules

Index

A
access

Geocoder

adding 15 revoking 16
address option

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

GDT Geocoder 19
auto-generated files, POI 33

I
imagery access 45 input file

B
borders

configuring 44

auto-generated 33 POI entries 32


installation

C
commands

khpublish 34

Geocoder 16, 17 server 15 YPSearch 16, 19

D
database

K
Keyhole 2 Fusion

URL list 41, 42 URLs 40


databases

auto-generated files 33
Keyhole client

template file path 43


Keyhole HTML

server variables for publishing 37


directives, required

URL for 43
Keyhole Server

KffEarthviewerHTMLTemplateDirectory 43 KffTexturePath 41 domain name, primary 40, 42

E
earth imagery

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

rendering 41

G
GDT Geocoder

address option 19

47

KffDbRootMergerPostambleMerge 41 KffDbRootMergerURL 41 KffEarthrenderDatabaseURL 42 KffEarthrenderHostName 42 KffEarthviewerBorderLayers 44 KffEarthviewerGeocoderServer 43 KffEarthviewerHTMLTemplateDirectory KffEarthviewerHTMLURL 43 KffEarthviewerHTMLUrlAlloListfile 45 KffEarthviewerHTMLUserAgentListFile 44 KffEarthviewerRoadLayers 44 KffEarthviewerStreamServer 43 KffFlatfileDatabaseURL 40 KffFlatfileHostName 40 KffFlatfileLogFilePath 40 KffGeoServerUrlPath 42 KffTexturePath 41 KffYPServerUrlPath 42 khg_add_entries 31 khg_delete_entries 33

mod_keyholehtml

KffEarthviewerHTMLTemplateDirectory 43 KffEarthviewerHTMLURL 43 KffEarthviewerStreamServer 43


modules

43

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


MySQL

setup 17

P
POI

L
log files

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

path location for 40

M
mod_dbrootmerger

see also POI 31 database for 31

KffDbRootMergerPostambleMerge 41 KffDbRootMergerURL 41
mod_earthrender

R
road data

configuring 44

KffEarthrenderDatabaseURL 42 KffEarthrenderHostName 42 KffGeoServerUrlPath 42 KffTexturePath 41 KffYPServerUrlPath 42


mod_earthviewerhtml

S
system requirements 14

T
texture images

KffEarthviewerBorderLayers 44 KffEarthviewerGeocoderServer 43 KffEarthviewerHTMLUrlAlloListfile 45 KffEarthviewerHTMLUserAgentListFile 44 KffEarthviewerRoadLayers 44


mod_flatfile

location 41

U
URL allow list, path for 45 user agent

path for list file 44


users

KffFlatfileDatabaseURL 40 KffFlatfileHostName 40 KffFlatfileLogFilePath 40


48 Index

access 15 access logs 16 adding 15

removing 16

Y
YPSearch

installing 16, 19 server URL 42 testing installation 21

errors 20

Index

49

You might also like