Geo Polygon
geo_polygon
Builds a GeoJSON Polygon with an exterior ring and optional holes.
Spec
geo_polygon(rings)Parameters
rings - Array of rings. Each ring contains at least four [longitude, latitude] pairs and repeats its first position at the end. The first ring is the exterior; later rings are holes.
Return Value
A JSON geometry, or null for invalid or null rings.
Example
datatable(n:int64)[1]
| project geometry = geo_polygon(pack_array(pack_array(pack_array(0,0), pack_array(4,0), pack_array(4,4), pack_array(0,0))))
| render map2d with (MapType = "geometry")| Geometry type | Exterior ring |
|---|---|
| Polygon | [[0,0],[4,0],[4,4],[0,0]] |