ToKML - spectrum_spatial - Latest

Spectrum Spatial Guide

Product type
Software
Portfolio
Locate
Product family
Spectrumâ„¢ software
Product
Spectrumâ„¢ software > Spatial > Spectrum Spatial
Version
Latest
ft:locale
en-US
Product name
Spectrum Technology Platform
ft:title
Spectrum Spatial Guide
Copyright
2025
First publish date
2007
ft:lastEdition
2025-03-07
ft:lastPublication
2025-03-07T10:28:48.112000

Description

Converts a geometry to its KML (formerly Keyhole Markup Language) equivalent. This function deals with the KML geometry fragment only and assumes it is in the OGC KML 2.2.0 syntax. The KML schema is located at http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd.

Syntax

ToKML (obj )

Arguments

obj is a feature geometry

Example

This query:
select Country, Capital, ToKML(Obj) as KMLGeometry from "/Samples/NamedTables/WorldcapTable" where Country = 'CANADA'

returns the following KML-formatted string from a feature geometry that is always in the OGC KML 2.2.0 namespace:

<Point xmlns="http://www.opengis.net/kml/2.2"><coordinates>-75.65075,45.3742219</coordinates></Point>