Loading TOC...

mcgm:polygon

mcgm:polygon(
   $vertices as element(Dot)*
) as cts:polygon

Summary

Construct a cts:polygon value from a sequence of MCGM Dot elements.

Parameters
vertices A sequence of Dot elements representing the vertices of the polygon.

Example

  xquery version "1.0-ml";
  import module namespace mcgm = "http://marklogic.com/geospatial/mcgm"
         at "/MarkLogic/geospatial/mcgm.xqy";

  mcgm:polygon(( <Dot Latitude="12.5" Longitude="-127.24"/>,
                 <Dot Latitude="15.25" Longitude="-127.8"/>,
                 <Dot Latitude="13.45" Longitude="-126.1"/>,
                 <Dot Latitude="12.5" Longitude="-127.24"/>
              ))
  

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