/
KML Query Response Transformer
KML Query Response Transformer
Description
The KML Query Response Transformer is responsible for translating a Query Response into a KML formatted document.
Usage
Using the OpenSearch Endpoint for example, query with the format option set to the KML shortname: kml
.
http://localhost:8181/services/catalog/query?q=schematypesearch&format=kml
Example Output
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <kml xmlns:ns2="http://www.google.com/kml/ext/2.2" xmlns="http://www.opengis.net/kml/2.2" xmlns:ns4="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" xmlns:ns3="http://www.w3.org/2005/Atom"> <Folder id="2c19380f-529f-4a91-867e-a7debc914244"> <name>DDF Query Results</name> <open xsi:type="xs:boolean" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">true</open> <Document id="ef6335a1e79d46bba65d11cdd7d02c92-doc"> <name>DDF Search/name> <open xsi:type="xs:boolean" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">true</open> <Style id="defaultStyle"> <LineStyle> <color>8fff0000</color> <width>4.0</width> </LineStyle> <PolyStyle> <color>7dcc0000</color> <fill xsi:type="xs:boolean" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">true</fill> <outline xsi:type="xs:boolean" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">true</outline> </PolyStyle> </Style> <Placemark id="ef6335a1e79d46bba65d11cdd7d02c92"> <name>DDF search</name> <description>A DDF Search found several results. <a href="http://localhost:8181/services/catalog//ef6335a1e79d46bba65d11cdd7d02c92"> DDF Search </a> </description> <styleUrl>#defaultStyle</styleUrl> <Polygon> <outerBoundaryIs> <LinearRing> <coordinates>44.0,34.0 44.0,33.0 45.0,33.0 45.0,34.0 44.0,34.0</coordinates> </LinearRing> </outerBoundaryIs> </Polygon> </Placemark> </Document> <Document id="22e9da1eefa74eb9b9f97636cab3f493-doc"> <name>Brazil Amazon Rain Forest schematypesearch</name> <open xsi:type="xs:boolean" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">true</open> <Style id="defaultStyle"> <LineStyle> <color>8fff0000</color> <width>4.0</width> </LineStyle> <PolyStyle> <color>7dcc0000</color> <fill xsi:type="xs:boolean" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">true</fill> <outline xsi:type="xs:boolean" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">true</outline> </PolyStyle> </Style> <Placemark id="22e9da1eefa74eb9b9f97636cab3f493"> <name>Brazil Amazon Rain Forest schematypesearch</name> <description> <a href="http://localhost:8181/services/catalog//22e9da1eefa74eb9b9f97636cab3f493"> Brazil Amazon Rain Forest schematypesearch </a> </description> <styleUrl>#defaultStyle</styleUrl> </Placemark> </Document> <Document id="ab3a5626ed80439aa8e2497835b54187-doc"> <name>Position Predator Iraq Mission M2 10 schematypesearch</name> <open xsi:type="xs:boolean" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">true</open> <Style id="defaultStyle"> <LineStyle> <color>8fff0000</color> <width>4.0</width> </LineStyle> <PolyStyle> <color>7dcc0000</color> <fill xsi:type="xs:boolean" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">true</fill> <outline xsi:type="xs:boolean" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">true</outline> </PolyStyle> </Style> <Placemark id="ab3a5626ed80439aa8e2497835b54187"> <name>Book Search</name> <description> <a href="http://localhost:8181/services/catalog//ab3a5626ed80439aa8e2497835b54187"> Book Search </a> </description> <styleUrl>#defaultStyle</styleUrl> </Placemark> </Document> <Document id="d5c90fcc2be6471aaffa098262babf7e-doc"> <name>Ballpark search</name> <open xsi:type="xs:boolean" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">true</open> <Style id="defaultStyle"> <LineStyle> <color>8fff0000</color> <width>4.0</width> </LineStyle> <PolyStyle> <color>7dcc0000</color> <fill xsi:type="xs:boolean" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">true</fill> <outline xsi:type="xs:boolean" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">true</outline> </PolyStyle> </Style> <Placemark id="d5c90fcc2be6471aaffa098262babf7e"> <name>Ballpark search</name> <description> <a href="http://localhost:8181/services/catalog//d5c90fcc2be6471aaffa098262babf7e"> Ballpark search </a> </description> <styleUrl>#defaultStyle</styleUrl> </Placemark> </Document> </Folder> </kml>
Installation and Uninstallation
Install the catalog-kml-metacardtransformer
feature using the Web Console or System Console.
Configuration
None
Implementation Details
Transformer Shortname | kml |
---|---|
MIME Type | application/vnd.google-earth.kml+xml |
Query Result Mapping
Metacard | KML | Notes |
---|---|---|
Metacard.ID | Placemark ID | |
Metacard.ID | Document ID | "-doc" suffix added |
DDMS Title | Placemark Name | |
DDMS Description & DDMS Title | Placemark Description | Placemark Description includes DDMS Description, the REST URL to access the complete metacard and the DDMS Title. |
DDMS Geometry | KML Geometry | |
Folder ID | If the OpenSearch invocation query parameter subscription is specified,the Folder ID will be set to that. Otherwise, the Folder ID is randomly generated. |
Known Issues
None
, multiple selections available,