geojson:complex-polygon( $complex-polygon as node() ) as cts:complex-polygon
Create a cts:complex-polygon
value from a
GeoJSON "Polygon" type geometry object. The polygon returned
represents the combination of
the exterior polygon and the interior polygons.
Parameters | |
---|---|
complex-polygon | A Polygon node representing the complex polygon. |
xquery version "1.0-ml"; import module namespace geojson = "http://marklogic.com/geospatial/geojson" at "/MarkLogic/geospatial/geojson.xqy"; geojson:complex-polygon(object-node { "type": "Polygon", "coordinates": array-node { array-node { array-node {100.0, 0.0}, array-node {101.0, 0.0}, array-node {101.0, 1.0}, array-node {100.0, 1.0}, array-node {100.0, 0.0} }, array-node { array-node {100.2, 0.2}, array-node {100.8, 0.2}, array-node {100.8, 0.8}, array-node {100.2, 0.8}, array-node {100.2, 0.2} } } })
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.