Loading TOC...

geo.circleIntersects

geo.circleIntersects(
   $circle as cts.circle,
   $region as cts.region[],
   [$options as String[]]
) as Boolean

Summary

Returns true if the circle intersects with a region.

Parameters
$circle A geographic circle.
$region One or more geographic regions (boxes, circles, polygons, or points). Where multiple regions are specified, return true if any region intersects the target circle.
$options Options for the operation. The default is ().

Options include:

"coordinate-system=string"
Use the given coordinate system. Valid values are:
wgs84
The WGS84 coordinate system.
raw
The raw (unmapped) coordinate system.
"units=miles"
Distance (for circles) is measured in miles.
"boundaries-included"
Points on boxes', circles', and polygons' boundaries are counted as matching. This is the default.
"boundaries-excluded"
Points on boxes', circles', and polygons' boundaries are not counted as matching.
"boundaries-latitude-excluded"
Points on boxes' latitude boundaries are not counted as matching.
"boundaries-longitude-excluded"
Points on boxes' longitude boundaries are not counted as matching.
"boundaries-south-excluded"
Points on the boxes' southern boundaries are not counted as matching.
"boundaries-west-excluded"
Points on the boxes' western boundaries are not counted as matching.
"boundaries-north-excluded"
Points on the boxes' northern boundaries are not counted as matching.
"boundaries-east-excluded"
Points on the boxes' eastern boundaries are not counted as matching.
"boundaries-circle-excluded"
Points on circles' boundary are not counted as matching.
"boundaries-endpoints-excluded"
Points on linestrings' boundary (the endpoints) are not counted as matching.

Example

// Is the Greenwich Observatory within a mile of the A2 Blackheath Road? Yes.
 
geo.circleIntersects(
  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

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy