geo:regionintersects
geo:regionintersects(
$target as cts:region,
$region as cts:region*,
[$options as xs:string*]
) as xs:boolean
Summary
Returns true if the target region intersects with a region.
Parameters 
target 
A geographic region (box, circle, polygon, or point).

region 
One or more geographic regions.
Where multiple regions are specified, return true if any region intersects
the target region.

options 
Options for the operation. The default is ().
Options include:
Options include:
 "coordinatesystem=string"
 Use the given coordinate system. Valid values are:
 wgs84
 The WGS84 coordinate system.
 wgs84/double
 The WGS84 coordinate system at double precision.
 etrs89
 The ETRS89 coordinate system.
 etrs89/double
 The ETRS89 coordinate system at double precision.
 raw
 The raw (unmapped) coordinate system.
 raw/double
 The raw coordinate system at double precision.
 "precision=value"
 Use the coordinate system at the given precision. Allowed values:
float and double .
 "units=value"
 Measure distance, radii of circles, and tolerance in the specified units.
Allowed values:
miles (default), km ,
feet , meters .
 "tolerance=distance"
 Tolerance is the largest allowable variation in geometry calculations.
If the distance between two points is less than tolerance, then the two
points are considered equal. For the raw coordinate system, use the units
of the coordinates. For geographic coordinate systems, use the units
specified by the units option.
 "boundariesincluded"
 Points on regions' boundaries are counted as matching.
This is the default.
 "boundariesexcluded"
 Points on regions' boundaries are not counted as matching.
 "boundarieslatitudeexcluded"
 Points on boxes' latitude boundaries are not counted as
matching.
 "boundarieslongitudeexcluded"
 Points on boxes' longitude boundaries are not counted as
matching.
 "boundariessouthexcluded"
 Points on the boxes' southern boundaries are not counted as
matching.
 "boundarieswestexcluded"
 Points on the boxes' western boundaries are not counted as
matching.
 "boundariesnorthexcluded"
 Points on the boxes' northern boundaries are not counted as
matching.
 "boundarieseastexcluded"
 Points on the boxes' eastern boundaries are not counted as
matching.
 "boundariescircleexcluded"
 Points on circles' boundary are not counted as matching.
 "boundariesendpointsexcluded"
 Points on linestrings' boundary (the endpoints) are not counted as matching.

Usage Notes
The value of the
precision
option takes precedence over
that implied by the governing coordinate system name, including the
value of the
coordinatesystem
option. For example, if the
governing coordinate system is "wgs84/double" and the
precision
option is "float", then the operation uses single precision.
See Also
Example
(: Is the Greenwich Observatory within a mile of the A2 Blackheath Road? Yes.
:)
geo:regionintersects(
cts:circle(1, cts:point(51.48,0)),
cts:linestring((
cts:point(51.4745404, 0.0238609),
cts:point(51.4742464, 0.0212431),
cts:point(51.4731772, 0.0186682),
cts:point(51.4729901, 0.0151920),
cts:point(51.4722950, 0.0132608),
cts:point(51.4727495, 0.0084972),
cts:point(51.4718139, 0.0015020),
cts:point(51.4728029, 0.0095701),
cts:point(51.4747810, 0.0241184))))
==> true
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.