FromKML
Description
Converts a string formatted in KML (Keyhole Markup Language) to a feature geometry, such as a Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, or Geometry Collection. This function deals with the KML geometry fragment only and assumes it is in the OGC KML 2.2.0 syntax. FromKML() will not enforce the namespace to be in OGC KML 2.2.0 as long as the syntax is conformed to. The KML schema is located at http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd.
Note: This function is
supported only for WGS 1984, EPSG:4326.
An example of a KML string is:
<Point xmlns="http://www.opengis.net/kml/2.2"><coordinates>-75.65075,45.3742219</coordinates></Point>
Syntax
FromKML (str)
Arguments
str is a KML string
Example
Returns a feature geometry from a KML-formatted string.
select Country from countries where FromKML('<Point xmlns="http://www.opengis.net/kml/2.2"><coordinates>-122.364167,37.824787,50</coordinates></Point>') Within obj