Supported in: Batch, Streaming
Parses KML geometry definitions as a GeoJSON. Ignores all attributes. This expression operates on already extracted text; please extract files to text before using this expression.
Expression categories: Geospatial
Output type: String | Struct<ok, error>
Description: Basic polygons. Argument values:
col
col | Output |
---|---|
<LineString> <coordinates> -71.1663,42.2614 -71.1667,42.2616 </coordinates> </LineString> | {"type":"LineString","coordinates":[[-71.1663,42.2614],[-71.1667,42.2616]]} |
<Polygon> <extrude>1</extrude> <altitudeMode>relativeToGround</altitudeMode> <ou... | {"type":"Polygon","coordinates":[[[-122.0848938459612,37.42257124044786,17.0],[-122.0847882750515,37... |
<Polygon> <extrude>1</extrude> <altitudeMode>relativeToGround</altitudeMode> <ou... | {"type":"Polygon","coordinates":[[[-77.05465973756702,38.87291016281703,100.0],[-77.0531553685479,38... |
<Point> <coordinates> -71.1663,42.2614 </coordinates> </Point> | {"type":"Point","coordinates":[-71.1663,42.2614]} |
<MultiGeometry> <Polygon> <outerBoundaryIs> <coordinates> -71.1663,42.2614 -71.1... | {"type":"MultiPolygon","coordinates":[[[[-81.1679,32.2614],[-81.1679,32.28],[-81.1663,32.28],[-81.16... |
Description: Basic polygons with result type outputs. Argument values:
col
with_errors
col | shouldPrepare | Output |
---|---|---|
<LineString> <coordinates> -71.1663,42.2614 -71.1667,42.2616 </coordinates> </LineString> | true | { error: null, ok: {"type":"LineString","coordinates":[[-71.1663,42.2614],[-71.1667,42.2616]]}, } |
<Polygon> <extrude>1</extrude> <altitudeMode>relativeToGround</altitudeMode> <ou... | true | { error: null, ok: {"type":"Polygon","coordinates":[[[-122.0848938459612,37.42257124044786,17.0],[-122.0847882750515,37..., } |
<Polygon> <extrude>1</extrude> <altitudeMode>relativeToGround</altitudeMode> <ou... | true | { error: null, ok: {"type":"Polygon","coordinates":[[[-77.05465973756702,38.87291016281703,100.0],[-77.0531553685479,38..., } |
<Point> <coordinates> -71.1663,42.2614 </coordinates> </Point> | true | { error: null, ok: {"type":"Point","coordinates":[-71.1663,42.2614]}, } |
<MultiGeometry> <Polygon> <outerBoundaryIs> <coordinates> -71.1663,42.2614 -71.1... | true | { error: null, ok: {"type":"MultiPolygon","coordinates":[[[[-81.1679,32.2614],[-81.1679,32.28],[-81.1663,32.28],[-81.16..., } |
Description: Full KML files with documents and folders are not supported. Argument values:
col
col | Output |
---|---|
<kml xmlns="http://www.opengis.net/kml/2.2"\> <Document> <name>KML Samples</name> <... | null |
Description: Example of null input. Argument values:
col
col | Output |
---|---|
null | null |
empty string | null |
Description: Invalid KML examples. Argument values:
col
col | Output |
---|---|
<Polygon><mal> formed KML </ml></Polygon> | null |
<Polygon> <extrude>1</extrude> <altitudeMode>relativeToGround</altitudeMode> <ou... | null |
<Polygon><innerBoundaryIs><LinearRing> <coordinates> -123.0,37.0,17 -122.0,38.0,17 ... | null |
Description: Invalid KML examples with out-of-bounds coordinates Argument values:
col
col | Output |
---|---|
<Polygon><outerBoundaryIs><LinearRing> <coordinates> -180.3348783983763,95.1514008468736,... | null |
Description: Invalid KML examples with out-of-bounds coordinates when prepare geometry is not run will return a geometry. Argument values:
col
simple
shouldPrepare
col | shouldPrepare | Output |
---|---|---|
<Polygon><outerBoundaryIs><LinearRing> <coordinates> -180.3348783983763,95.1514008468736,... | false | {"coordinates":[[[-180.3348783983763,95.1514008468736,100.0],[-180.3372535345629,95.14888517553887,1... |