
geo:polygon( $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.
xquery version "1.0-ml";
import module namespace geo = "http://marklogic.com/geospatial"
at "/MarkLogic/geospatial/geospatial.xqy";
geo: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: Get the most useful answers to questions from the MarkLogic community, or ask your own question.