geo:polygon-contains( $polygon as cts:polygon, $region as cts:region*, [$options as xs:string*] ) as xs:boolean
Returns true if the polygon contains a region.
precision
option takes precedence over
that implied by the governing coordinate system name, including the
value of the coordinate-system
option. For example, if the
governing coordinate system is "wgs84/double" and the precision
option is "float", then the operation uses single precision.
(: Is the London Zoo in Regent's Park? Yes :) geo:polygon-contains( cts:polygon(( cts:point(51.5298921,-0.1674557), cts:point(51.5327487,-0.1660395), cts:point(51.5343504,-0.1644945), cts:point(51.5354716,-0.1620483), cts:point(51.5367796,-0.1574993), cts:point(51.5374737,-0.1526499), cts:point(51.5369398,-0.1488304), cts:point(51.5351513,-0.1468134), cts:point(51.5319478,-0.1460838), cts:point(51.5284771,-0.1460409), cts:point(51.5253265,-0.1455688), cts:point(51.5237779,-0.1450968), cts:point(51.5227899,-0.1461697), cts:point(51.5233507,-0.1478004), cts:point(51.5246323,-0.1483583), cts:point(51.5248192,-0.1587868), cts:point(51.5266348,-0.1604605), cts:point(51.5292514,-0.1644945), cts:point(51.5298387,-0.1665545) )), cts:polygon(( cts:point(51.5361190,-0.1590335), cts:point(51.5366529,-0.1568234), cts:point(51.5372001,-0.1537657), cts:point(51.5372868,-0.1527464), cts:point(51.5334561,-0.1509440), cts:point(51.5332359,-0.1517808), cts:point(51.5348643,-0.1584756), cts:point(51.5355250,-0.1592481), cts:point(51.5360522,-0.1590765) ))) ==> true