MarkLogic Server 11.0 Product Documentation
geo.complexPolygonContainsgeo.complexPolygonContains(
complex-polygon as cts.complexPolygon,
region as cts.region[],
[options as String[]]
) as Boolean
Summary
Returns true if the complex-polygon contains a region.
Parameters |
complex-polygon |
A geographic complex polygon.
|
region |
One or more geographic regions (boxes, circles, polygons, or points).
Where multiple regions are specified, return true if any region intersects
the target polygon.
|
options |
Options for the operation. The default is ().
Options include:
Options include:
- "coordinate-system=string"
- Use the given coordinate system. Valid values are:
- wgs84
- The WGS84 coordinate system with degrees as the angular unit.
- wgs84/radians
- The WGS84 coordinate system with radians as the angular unit.
- wgs84/double
- The WGS84 coordinate system at double precision with degrees as the angular unit.
- wgs84/radians/double
- The WGS84 coordinate system at double precision with radians as the angular unit.
- 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.
- "boundaries-included"
- Points on boxes', circles', and complex-polygons' boundaries are
counted as matching. This is the default.
- "boundaries-excluded"
- Points on boxes', circles', and complex-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.
|
Usage Notes
The value of the
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.
See Also
Example
const cp =
cts.complexPolygon(
cts.polygon("0,0 10,0 10,10 0,10 0,0"),
cts.polygon("5,0 7,0 7,5 5,5 5,0"));
const poly =
cts.polygon("6,8 6.5,8 6.5,9 6,9 6,8");
geo.complexPolygonContains(cp, poly);
// returns true
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.