A 3.493Mb PDF of this article as it appeared in the magazine—complete with images—is available by clicking HERE
Google Earth is rapidly becoming the land surveyor’s tool-of-choice for preliminary job site reconnaissance and survey planning (see "Topography is Dead," by Joel Leininger, March 2007). Survey projects often begin with the investigation and selection of nearby NGS marks to establish horizontal and vertical control. There are many strategies for plotting NGS control stations in Google Earth, the most flexible of which involve translating shapefiles (see "Google Earth brings GIS to the masses," by Rj Zimmer, May 2007) or parsing datasheets, but the process is tedious, requiring server queries, file downloads, and client-side translation software. Furthermore, this process must be repeated periodically because new stations are added to the NGS database daily (NGS 2008a). Yet another complication is that the NGS server will not return datasheets or shapefiles for more than 1100 marks per query.
Recently, the NGS has published a Windows program, DSWorld (Archer-Shee 2008), that overcomes some of these problems by using the get_mark_list utility (NGS 2005). DSWorld produces a static keyhole markup language (KML) file for an entire county, containing either horizontal or vertical marks. Currently, DSWorld must be installed on a Windows PC, supports neither point of interest (POI) nor area of interest (AOI) queries, and offers limited filtering capabilities (horizontal or vertical).
The software presented here, NGSCS, is entirely webbased, requires no installation, and will very likely work on any Google Earth-supported platform with a modern web browser. The program is written in C#, runs on a Windows web server, and writes streaming KML to a Google Earth client. The web application essentially acts as a front end for the NGS station list server. It submits requests to the NGS web server and translates the textual information returned by the NGS server into KML so that it can be displayed graphically by Google Earth.
NGSCS
The NGSCS web page (http://www.metzgerwillard.us/NGSCS.html) provides brief documentation and a hyperlink to the query setup form (Fig. 1), illustrated here with all form controls enabled.
The setup form defines parameters that are either nongeographical or not easily related to latitude and longitude. When the OK button is pressed, a KML document with a Google Earth network link (Google 2008) named Search Results is downloaded to the client. This link contains the user’s choice of 18 station types and 5 stabilities (Table 1), together with other parameters specific to the search type. Network link parameters may be inspected by examining the properties of the Search Results folder. Contents are added to the Search Results folder when the network link is activated, and replaced when the link is refreshed.
All station markers are color-coded by type with mnemonic initials.
H (orange) = horizontal only
V (blue) = vertical only
B (pink) = both horizontal and vertical
Station types are categorized in subfolders so that visibility, icons, and labels may be customized by applying styles (color, scale, and opacity) to folders instead of individual placemarks. Each folder name includes the number of stations in parentheses.
Station balloons (Fig. 2) contain all information supplied by the NGS get_mark_list utility.
Station Name
Permanent Identifier (PID)
Distance = distance from POI (for radial searches)
Order H V = horizontal and vertical orders
V Source = vertical source
Approximate Latitude and Longitude
Station Stability
Clicking on the PID (AA1800) returns a current datasheet to the user’s web browser. The complete output from get_mark_list may be inspected in the user’s web browser by clicking on the Data Source hyperlink in the Stations folder balloon. The NGS Control Stations document balloon contains brief instructions appropriate to the search method, and the About folder balloon contains copyright information and the last revision date.
The NGS get_mark_list utility will not retrieve a list with more than 3000 stations for radial and rectangular searches. If this limit is exceeded, Search Results will contain a folder named "NGS Server Error." The limit for county searches is unknown. If a search finds no marks, Search Results will contain a folder named "No Stations Found."
Support for the "View in Google Maps" feature depends on the availability and limits of the Google Maps server. The server will not accept more than 1050 stations, and a response of "File not found" indicates a server timeout. The Google Maps server timesout quickly; searches on smaller areas with fewer stations are more likely to succeed.
Support for the "View in Virtual Earth" feature depends on the availability and limits of the Live Search Maps server. The server will not accept more than 200 stations.
In the following sections, elements specific to radial, rectangular, and county search methods are discussed, and a software implementation summary is presented.
Radial Search
NGSCS Radial Search (Fig. 3) creates a Google Earth network link that plots the approximate location of NGS control stations within a specified distance of the view center. The radial search method provides a graphical front end to the NGS station list server for POI queries. Unlike most network link applications, the radial search is not activated when the file is first loaded, nor is the link automatically refreshed when the view changes. Instead, the user centers the POI in the viewer and manually initiates the refresh.
1. Position the POI in the center of the view. One way to do this is to double-click an unmarked location; another is to edit the properties of a placemark and reset the view.
2. Check the box beside the network link (Search Results folder). Range rings and station markers should appear within a few minutes.
3. On subsequent uses, reposition the POI and ensure that the network link is checked and selected. Then choose
Refresh from the Edit menu, or right-click and select
Refresh in the Context menu.
Range rings are drawn at one-mile increments from the POI and collected in the Regions folder. Radii up to 10 miles are permitted, but the NGS server will not retrieve a list with more than 3000 stations.
Rectangular Search
NGSCS Rectangular Search (Fig. 4) creates a Google Earth network link that plots the approximate location of NGS control stations within the viewer bounding box. The rectangular search method provides a graphical front end to the NGS station list server for AOI queries. Unlike most network link applications, the rectangular search is not activated when the file is first loaded, nor is the link automatically refreshed when the view changes. Instead, the user positions the AOI in the viewer and manually initiates the refresh.
1. Position the AOI in the viewer.
2. Check the box beside the network link (Search Results folder). Station markers should appear within a few minutes.
3. On subsequent uses, reposition the AOI and ensure that the network link is checked and selected. Then choose
Refresh from the Edit menu, or right-click and select
Refresh in the Context menu.
Areas up to 20′ x 20′ (arc minutes) are permitted, but the NGS server will not retrieve a list with more than 3000 stations.
When the Google Earth radio button is selected on the setup form, NGSCS County Search (Fig. 5) creates a network link that plots the approximate location of NGS control stations within a selected county. Federal Information Processing Standards (FIPS) codes for 3374 counties and equivalent entities of the United States, its possessions, and associated areas as supplied by the get_country utility (NGS 2008b) are supported. Google Earth must be installed as the default KML application when this option is selected.
1. The County Search network link (Monroe, FL folder) is activated when it is first loaded. Station markers should appear within a few minutes.
2. To update the county search, ensure that the network link is checked and selected. Then choose Refresh from the Edit menu, or right-click and select Refresh in the Context menu.
Search results may be directed to Google Maps by selecting the Google Maps radio button on the setup form. Support for this feature depends on the availability and limits of the Google Maps server. The server will not accept more than 1050 stations, and a response of "File not found" indicates a server timeout.
Search results may be directed to Live Search Maps by selecting the Virtual Earth radio button on the setup form. Support for this feature depends on the availability and limits of the Live Search Maps server. The server will not accept more than 200 stations.
Search results may be directed to NASA World Wind by selecting the World Wind radio button on the setup form. World Wind must be installed as the default KML application and must be closed when this option is selected.
Station locations returned by the NGS get_mark_list utility are truncated, rather than rounded, to arc seconds for a county search. Also unlike other methods, get_mark_list does not currently recognize zero-order GPS stations, tanks, or towers as horizontal marks when performing a county search. To visualize horizontal stations, plot all marks and uncheck the Vertical folder. Destroyed marks and marks with incomplete datasheets are not reported by county searches, nor do county searches assign vertical order to horizontal control stations with NGVD 29 heights.
Implementation
Google Earth permits users to add content to a display using KML, an XML-based markup language for geographic data. The content to be added can be in the form of a file retrieved from the Internet. The NGSCS web application uses this feature of Google Earth in order to display graphically control station information retrieved from the NGS.
The NGS makes control station datasheets available to the public on their web site. Anyone can visit http://www.ngs.noaa.gov/cgi-bin/datasheet.prl and retrieve datasheets using any of several retrieval methods, including radial search, rectangular search, and county search. The user must enter geographic search parameters (latitude and longitude) as text. Other parameters, such as desired data type and stability, are specified by selecting options from dropdown lists. The NGS web site returns a list of stations that meet the search criteria as a multiselection dropdown list. The user can then select any of those stations and retrieve the datasheets.
The NGSCS web application acts as an intermediary between its users and the NGS web site. To its users, it is simply a web application that they access using a standard browser. To the NGS web site, NGSCS appears to be a browser, which requests information and displays the results.
A user begins the process of retrieving control station data by submitting a request for the URL http://metzgerwillard. us/ Setup.aspx. NGSCS responds with the page shown in Fig. 1. Using this page, the user specifies the type of search and nongeographic parameters such as the station type and stability desired. When the user clicks OK, the browser sends the user’s inputs back to NGSCS. NGSCS creates a KML file including a Google Earth network link for the search requested by the user. The network link is similar to one that could be submitted directly to the NGS, but rather than the NGS URL, it has the NGSCS URL followed by a query string consisting of the user’s search parameters. In the case of a radial search or a rectangular search, the network link includes specifications for Google Earth to add latitude and longitude information to the query string based on the current display. NGSCS returns the KML file in response to the request submitted by the user.
If Google Earth has been installed on the user’s computer as the default KML application, the computer will launch Google Earth upon receipt of the KML file. Google Earth will input the file and save the contents as a folder under Temporary Places as shown in the left hand panels of Figures 3, 4, and 5.
In the case of a radial search or a rectangular search, the user pans and zooms the display to the point or area of interest and then clicks on the checkbox beside the folder name. Google Earth then submits the web request in the network link. In the case of a county search, the initial display is irrelevant and Google Earth submits the request immediately.
The URL in the network link is the URL of a page in NGSCS. Server code in NGSCS is activated upon receipt of the request. Using the search parameters in the request, NGSCS creates a web request in the form expected by the NGS web site and submits the request to the NGS just as a browser would. The NGS web application performs the requested search and sets up an HTML page, intended to be displayed by a browser. The NGS server embeds the HTML in a message which it sends back in response to the request.
NGSCS receives the message returned by the NGS just as a browser would. But rather than displaying the page, NGSCS parses the message to extract the control station information. It reformats the control station information as KML and returns the KML message to the requester, Google Earth. Google Earth processes the KML and displays the control station information as shown in the right hand panels of Figures 3, 4, and 5.
"View in Google Maps" functionality is accomplished by submitting a request for the URL http://maps.google.com/ maps followed by a query string (Mapki 2008) containing the NGSCS URL and the user’s search parameters. The Google Maps server in turn submits a request to the NGSCS server, and search results are returned to Google Maps.
"View in Virtual Earth" functionality is accomplished by submitting a request for the URL http://maps.live.com/ followed by a query string (Microsoft 2008) containing the NGSCS URL and the user’s search parameters. The Live Search Maps server in turn submits a request to the NGSCS server, and search results are returned to Live Search Maps.
The "View in World Wind" option for county searches simply bypasses the network link download and sends search results directly to the user’s default KML application.
Conclusion
It is likely that the NGS will someday serve KML-formatted output directly to the client (Smith and Genovese 2007), and the authors are hopeful that future releases of Google Earth will include internal methods to programmatically define network link parameters. In the meantime, Metzger & Willard, Inc. is pleased to provide NGSCS to the land surveying community and others who may wish to visualize NGS control stations in Google Earth.
Acknowledegements
The authors wish to thank the following individuals for their help in implementing and testing NGSCS: Frank Mowry, NGS Systems Development; David Gietka, NGS Webmaster; Kemp Morris, PSM, Morris Surveying, Inc.; Scott Brown, PLS, George F. Young, Inc.; and Alvie Griffith, PE, PLS, Bentley Systems, Inc.
Tom Davis has worked in land surveying and design automation for 25 years and has held dual registration as a civil engineer and land surveyor for 15 years. He received his PhD in Civil Engineering from the University of South Florida where he taught for 6 years prior to joining Metzger & Willard, Inc. as Vice President of Surveying in 2004.
Rollins Turner is an instructor in the Department of Computer Science and Engineering at the University of South Florida in Tampa.
References
Archer-Shee, M. (2008). "DSWorld." National Geodetic Survey. (http://www.ngs.noaa.gov/PC_PROD/pc_prod.shtml#DSWORLD)
Google, Inc. (2008). "KML reference." (http://code.google.com/apis/kml/documentation/kmlreference.html)
Google Mapki (2008). "Google map parameters." (http://mapki.com/wiki/Google_Map_Parameters)
Microsoft Corporation (2008). "Build your own URL." (http://help.live.com/help.aspx?project=wl_local&market=engb&querytype=topic&query=wl_local_proc_buildurl.htm)
National Geodetic Survey (2008a). "NGS dates form." (http://www.ngs.noaa.gov/cgi-bin/ds_dates.prl)
National Geodetic Survey (2008b). " NGS get_country utility." (http://www.ngs.noaa.gov/cgi-bin/get_country.prl)
National Geodetic Survey (2005). "NGS get_mark_list utility." (http://www.ngs.noaa.gov/cgi-bin/get_mark_list.prl)
Smith, D. and Genovese, I. (2007). "A change for the better." ACSM Bulletin, April 2007. (http://acsmcongress.org/bulletinonline/bull226/ngsplan.pdf)
A 3.493Mb PDF of this article as it appeared in the magazine—complete with images—is available by clicking HERE