Loading TOC...

MarkLogic Server 11.0 Product Documentation
geojson.interiorPolygon

geojson.interiorPolygon(
   polygon as objectNode()
) as Sequence

Summary

Create a sequence of cts:polygon values from a GeoJSON "Polygon" type geometry object. The returned polygons represent the interior polygons, if any.

Parameters
polygon A GeoJSON Polygon node representing the polygon.

Example

const geojson = require('/MarkLogic/geospatial/geojson.xqy');

geojson.interiorPolygon(
  { type: 'Polygon', 
    coordinates: [
      [[100.0,0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]],
      [[100.2,0.2], [100.8, 0.2], [100.8, 1.8], [100.2, 1.8], [100.2, 0.2]]
  ] }
)
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.