Loading TOC...


   polygon-or-points as Node[]
) as cts.polygon


Create a cts.polygon value from a sequence of point nodes in one of the supported markup vocabularies, such as KML or GML.

polygon-or-points A sequence of nodes, each representing a vertex (point) of the polygon, or a polygon node. A polygon from one of the supported markup vocabularies represents the exterior polygon for those vocabularies that include both exterior and interior polygons in their representation.

Usage Notes

If you know the geospatial data format (GML, KML, etc.), it is more efficient to use the equivalent format-specific function.

See Also


// Create a cts.polygon from a set of GeoJSON points
const geo = require('/MarkLogic/geospatial/geospatial');

  {type: 'Point', coordinates: [100.0,0.0]},
  {type: 'Point', coordinates: [101.0,0.0]},
  {type: 'Point', coordinates: [101.0,1.0]},
  {type: 'Point', coordinates: [100.0,1.0]},
  {type: 'Point', coordinates: [100.0,0.0]}

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