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.
const 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.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.