Description
The KML Network Link Endpoint allows a user to generate a View-based KML Query Results Network Link. This Network Link can be opened with Google Earth establishing a dynamic connection between Google Earth and
DDF
. The Network Link will perform a query against the OpenSearch Endpoint periodically based on the current view in the KML client. The query parameters for this query are obtained by a bounding box generated by Google Earth as well as any other query parameters specified in the request.For instance, if an analyst is currently viewing Arizona in their Google Earth, the query results will only include results in Arizona. To generate this Network Link, make an HTTP GET request to http://<DDF_HOST>:8181/services/catalog/kml
. Additionally, if an analyst only wanted to see query results matching the contextual parameter "Airport," they could specify http://<DDF_HOST>:<DDF_PORT>/services/catalog/kml?q=Airport
. Now, the analyst, still viewing Arizona in Google Earth, would then receive all the catalog entries matching "Airport" in Arizona.
As an analyst changes their current view, the query will be re-executed with the bounding box of the new view. (This query gets re-executed 2 seconds after the user stops moving the view).
While looking at the same view, the query will be re-executed periodically to get all updates. The default refresh interval is 10 seconds. This can be specified as an "interval" query parameter in the Network Link request like this http://<DDF_HOST>:<DDF_PORT>/services/catalog/kml?
interval
=5
. The "interval" parameter is specified in seconds.
Usage
Once installed the KML Network Link Endpoint can be accessed at:
http://<DDF_HOST>:<DDF_PORT>/services/catalog/kml
Invoke the KML Network Link Endpoint using any OpenSearch query parameters except for geospatial parameters. The reason for this is that the current KML client view will provide the bounding box geospatial parameters for the query.
http://<DDF_HOST>:<DDF_PORT>/services/catalog/kml?q=Airport
Also, there is an optional query parameter "interval" that can be used to specify the refresh time in seconds (default is 10 seconds). With the View-based KML Query Results Network Link, Google Earth will refresh its results every <interval> time and every time the analyst stops moving the Google Earth view.
After the above request is sent, a KML Network Link document will be returned as a response to download or open. This KML Network Link can then be opened in Google Earth.
Example Output
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:xal="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"> <Folder> <name>DDF OpenSearch Network Link</name> <open ns5:type="ns6:boolean" xmlns:ns5="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns6="http://www.w3.org/2001/XMLSchema">true</open> <NetworkLink> <name>q=*&src=local&sort=date%3Adesc&format=kml&subscription=8e566e5e-ec65-43ec-883f-f20f82c14fec</name> <open ns5:type="ns6:boolean" xmlns:ns5="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns6="http://www.w3.org/2001/XMLSchema">true</open> <Link> <href>http://127.0.1.1:8181/services/catalog/query?q=*&src=local&sort=date%3Adesc&format=kml&subscription=8e566e5e-ec65-43ec-883f-f20f82c14fec</href> <refreshInterval>0.0</refreshInterval> <viewRefreshMode>onStop</viewRefreshMode> <viewRefreshTime>2.0</viewRefreshTime> <viewBoundScale>1.0</viewBoundScale> <viewFormat>bbox=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]</viewFormat> </Link> </NetworkLink> </Folder> </kml>
Installation and Uninstallation
The KML Network Link Endpoint can be installed and uninstalled using the normal processes described in the Configuration section.
Configuration
This KML Network Link Endpoint has no configurable properties. It can only be installed or uninstalled.
Known Issues
- There has been a rarely occurring issue with the Network Link connection between Google Earth and
DDF
. Google Earth will stop receiving updated responses. If this occurs, first try to delete the Network Link from Google Earth. If that does not resolve the issue, then restartDDF
.