geojson.parseGeojson( geojson as objectNode()[] ) as Sequence
Convert GeoJSON object nodes into cts:region
values.
Parameters | |
---|---|
geojson | Zero or more JSON object nodes conforming to the GeoJSON specification. |
The returned Sequence
contains cts:region
values.
var geojson = require('/MarkLogic/geospatial/geojson.xqy'); geojson.parseGeojson( { type: 'Polygon', coordinates: [ [[1.0, 5.0], [1.0, 8.0], [6.0, 8.0], [7.0, 5.0], [1.0, 5.0]] ] } ) ==> A Sequence that contains a cts.polygon equivalent to the input region.