Namespace: geo

planBuilder. geo

Builds expressions to call functions in the geo server library for a row pipeline.
Since:
  • 2.1.1

Methods


approxCenter(region, options) → {CtsPoint}

Return a point approximating the center of the given region. For a point, this is the point itself. For a circle, it is the center point. For a box, it is the point whose latitude is half-way between the northern and southern limits and whose longitude is half-way between the western and eastern limits. For polygons, complex polygons, and linestrings, an approximate centroid is returned. This approximation is rough, and useful for quick comparisons. Provides a client interface to a server function. See geo.approxCenter
Parameters:
Name Type Argument Description
region CtsRegion <optional>
A geospatial region.
options XsString <optional>
Options. The default is (). Options include: "box-percent=n" An integer between 0 and 100 (default is 100) that indicates what percentage of a polygon's bounding box slivers should be used in constructing the approximate centroid. Lower numbers use fewer slivers, giving faster but less accurate results; larger numbers use more slivers, giving slower but more accurate results. "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe raw coordinate system at double precision. "precision=value" The precision use for this operation, including the interpretation of input values. Allowed values: float, double. Default: The precision of the governing coordinate system.
Since:
  • 2.1.1
Returns:
Type
CtsPoint

arcIntersection(p1, p2, q1, q2, options) → {CtsPoint}

Returns the point at the intersection of two arcs. If the arcs do not intersect, or lie on the same great circle, or if either arc covers more than 180 degrees, an error is raised. Provides a client interface to a server function. See geo.arcIntersection
Parameters:
Name Type Argument Description
p1 CtsPoint <optional>
The starting point of the first arc.
p2 CtsPoint <optional>
The ending point of the first arc.
q1 CtsPoint <optional>
The starting point of the second arc.
q2 CtsPoint <optional>
The ending point of the second arc.
options XsString <optional>
Options for the operation. The default is (). Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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 and the radii of circles 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.
Since:
  • 2.1.1
Returns:
Type
CtsPoint

bearing(p1, p2, options) → {XsDouble}

Returns the true bearing in radians of the path from the first point to the second. An error is raised if the two points are the same. Provides a client interface to a server function. See geo.bearing
Parameters:
Name Type Argument Description
p1 CtsPoint <optional>
The first point.
p2 CtsPoint <optional>
The second point.
options XsString <optional>
Options for the operation. The default is (). Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe raw coordinate system at double precision. "precision=value" Use the coordinate system at the given precision. Allowed values: float and double. "units=value" Unit of measure of the tolerance value. Valid values are 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.
Since:
  • 2.1.1
Returns:
Type
XsDouble

boundingBoxes(region, options) → {CtsBox}

Returns a sequence of boxes that bound the given region. Provides a client interface to a server function. See geo.boundingBoxes
Parameters:
Name Type Argument Description
region CtsRegion <optional>
A geographic region (box, circle, polygon, or point).
options XsString <optional>
Options for the operation. The default is (). Options include: Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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. "box-percent=n" An integer between 0 and 100 (default is 100) that indicates what percentage of a polygon's bounding box slivers should be returned. Lower numbers give fewer, less accurate boxes; larger numbers give more, more accurate boxes. "tolerance=distance" Tolerance is the largest allowable variation in geometry calculations. The bounding boxes will be padded to cover any points within tolerance of the region. For the raw coordinate system, use the units of the coordinates. For geographic coordinate systems, use the units specified by the units option. The default value is 0 (no padding). "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.
Since:
  • 2.1.1
Returns:
Type
CtsBox

boxIntersects(box, region, options) → {XsBoolean}

Returns true if the box intersects with a region. Provides a client interface to a server function. See geo.boxIntersects
Parameters:
Name Type Argument Description
box CtsBox <optional>
A geographic box.
region CtsRegion <optional>
One or more geographic regions (boxes, circles, polygons, or points). Where multiple regions are specified, return true if any region intersects the box.
options XsString <optional>
Options for the operation. The default is (). Options include: Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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 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.
Since:
  • 2.1.1
Returns:
Type
XsBoolean

circleIntersects(circle, region, options) → {XsBoolean}

Returns true if the circle intersects with a region. Provides a client interface to a server function. See geo.circleIntersects
Parameters:
Name Type Argument Description
circle CtsCircle <optional>
A geographic circle.
region CtsRegion <optional>
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 XsString <optional>
Options for the operation. The default is (). Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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 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.
Since:
  • 2.1.1
Returns:
Type
XsBoolean

circlePolygon(circle, arcTolerance, options) → {CtsPolygon}

Construct a polygon approximating a circle. Provides a client interface to a server function. See geo.circlePolygon
Parameters:
Name Type Argument Description
circle CtsCircle <optional>
A cts circle that defines the circle to be approximated.
arcTolerance XsDouble <optional>
How far the approximation can be from the actual circle, specified in the same units as the units option. Arc-tolerance should be greater than the value of the tolerance option.
options XsString <optional>
Options with which you can customize this operation. The following options are available: "coordinate-system=value" Use the given coordinate system. Valid values are wgs84, wgs84/double, etrs89, etrs89/double, raw and raw/double. Defaults to the governing coordinating system. "precision=value" Use the coordinate system at the given precision. Allowed values: float and double. Defaults to the precision of the governing coordinate system. "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. Tolerance should be smaller than the value of the arc-tolerance parameter.
Since:
  • 2.1.1
Returns:
Type
CtsPolygon

contains(region1, region2, options) → {XsBoolean}

Compares geospatial regions to see if they fulfill the 'contains' DE-9IM relation. Provides a client interface to a server function. See geo.contains
Parameters:
Name Type Argument Description
region1 CtsRegion <optional>
The first geospatial region to compare. This region is the left operand of contains.
region2 CtsRegion <optional>
The second geospatial region to compare. This region is the right operand of contains.
options XsString <optional>
Options to this operation. The default is (). Available options: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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.
Since:
  • 2.1.1
Returns:
Type
XsBoolean

countDistinctVertices(region, options) → {XsInteger}

Return a count of the distinct number of vertices in a region, taking tolerance into account. Provides a client interface to a server function. See geo.countDistinctVertices
Parameters:
Name Type Argument Description
region CtsRegion <optional>
A cts region.
options XsString <optional>
Options include: "coordinate-system=value" Use the given coordinate system. Valid values are wgs84, wgs84/double, etrs89, etrs89/double, raw and raw/double. Defaults to the governing coordinating system. "precision=value" Use the coordinate system at the given precision. Allowed values: float and double. Defaults to the precision of the governing coordinate system. "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.
Since:
  • 2.1.1
Returns:
Type
XsInteger

countVertices(region) → {XsInteger}

This function returns a count of the number of vertices in a region. Provides a client interface to a server function. See geo.countVertices
Parameters:
Name Type Argument Description
region CtsRegion <optional>
A cts region.
Since:
  • 2.1.1
Returns:
Type
XsInteger

coveredBy(region1, region2, options) → {XsBoolean}

Compares geospatial regions to see if they fulfill the 'covered by' DE-9IM relation. Provides a client interface to a server function. See geo.coveredBy
Parameters:
Name Type Argument Description
region1 CtsRegion <optional>
The first geospatial region to compare. This region is the left operand of covered-by.
region2 CtsRegion <optional>
The second geospatial region to compare. This region is the right operand of covered-by.
options XsString <optional>
Options to this operation. The default is (). Available options: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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.
Since:
  • 2.1.1
Returns:
Type
XsBoolean

covers(region1, region2, options) → {XsBoolean}

Compares geospatial regions to see if they fulfill the 'covers' DE-9IM relation. Provides a client interface to a server function. See geo.covers
Parameters:
Name Type Argument Description
region1 CtsRegion <optional>
The first geospatial region to compare. This region is the left operand of covers.
region2 CtsRegion <optional>
The second geospatial region to compare. This region is the right operand of covers.
options XsString <optional>
Options to this operation. The default is (). Available options: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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.
Since:
  • 2.1.1
Returns:
Type
XsBoolean

crosses(region1, region2, options) → {XsBoolean}

Compares geospatial regions to see if they fulfill the 'crosses' DE-9IM relation. Provides a client interface to a server function. See geo.crosses
Parameters:
Name Type Argument Description
region1 CtsRegion <optional>
The first geospatial region to compare. This region is the left operand of crosses.
region2 CtsRegion <optional>
The second geospatial region to compare. This region is the right operand of crosses.
options XsString <optional>
Options to this operation. The default is (). Available options: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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.
Since:
  • 2.1.1
Returns:
Type
XsBoolean

destination(p, bearing, distance, options) → {CtsPoint}

Returns the point at the given distance (in units) along the given bearing (in radians) from the starting point. Provides a client interface to a server function. See geo.destination
Parameters:
Name Type Argument Description
p CtsPoint <optional>
The starting point.
bearing XsDouble <optional>
The bearing, in radians.
distance XsDouble <optional>
The distance, in units. See the units option, below.
options XsString <optional>
Options for the operation. The default is (). Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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 and the radii of circles in the specified units. Allowed values: miles (default), km, feet, meters.
Since:
  • 2.1.1
Returns:
Type
CtsPoint

disjoint(region1, region2, options) → {XsBoolean}

Compares geospatial regions to see if they fulfill the 'disjoint' DE-9IM relation. Provides a client interface to a server function. See geo.disjoint
Parameters:
Name Type Argument Description
region1 CtsRegion <optional>
The first geospatial region to compare. This region is the left operand of disjoint.
region2 CtsRegion <optional>
The second geospatial region to compare. This region is the right operand of disjoint.
options XsString <optional>
Options to this operation. The default is (). Available options: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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.
Since:
  • 2.1.1
Returns:
Type
XsBoolean

distance(p1, p2, options) → {XsDouble}

Returns the distance (in units) between two points. Provides a client interface to a server function. See geo.distance
Parameters:
Name Type Argument Description
p1 CtsPoint <optional>
The first point.
p2 CtsPoint <optional>
The second point.
options XsString <optional>
Options for the operation. The default is (). Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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 and the radii of circles in the specified units. Allowed values: miles (default), km, feet, meters.
Since:
  • 2.1.1
Returns:
Type
XsDouble

distanceConvert(distance, unit1, unit2) → {XsDouble}

This function converts a distance from one unit of measure to another. The supported units are "miles", "feet", "km", and "meters". This is a proper superset of the units supported as options to various geospatial functions ("miles","km"). Provides a client interface to a server function. See geo.distanceConvert
Parameters:
Name Type Argument Description
distance XsDouble <optional>
The distance.
unit1 XsString <optional>
The unit of the input distance parameter.
unit2 XsString <optional>
The unit to which the distance should be converted.
Since:
  • 2.1.1
Returns:
Type
XsDouble

ellipsePolygon(center, semiMajorAxis, semiMinorAxis, azimuth, arcTolerance, options) → {CtsPolygon}

Construct a polygon approximating an ellipse. Provides a client interface to a server function. See geo.ellipsePolygon
Parameters:
Name Type Argument Description
center CtsPoint <optional>
Center of the ellipse.
semiMajorAxis XsDouble <optional>
The semi major axis of the ellipse. The units are governed by the units option.
semiMinorAxis XsDouble <optional>
The semi minor axis of the ellipse. The units are governed by the units option.
azimuth XsDouble <optional>
The azimuth.
arcTolerance XsDouble <optional>
How far the approximation can be from the actual ellipse, specified in the same units as the units option. Arc-tolerance should be greater than the value of the tolerance option, which defaults to 0.05km (0.3106856 miles).
options XsString <optional>
Options with which to configure the behavior. Options include: "coordinate-system=value" Use the given coordinate system. Valid values are wgs84, wgs84/double, etrs89, etrs89/double, raw and raw/double. Defaults to the governing coordinating system. "precision=value" Use the coordinate system at the given precision. Allowed values: float and double. Defaults to the precision of the governing coordinate system. "units=value" Measure distance, the axes of the ellipse, 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.
Since:
  • 2.1.1
Returns:
Type
CtsPolygon

equals(region1, region2, options) → {XsBoolean}

Compares geospatial regions to see if they fulfill the 'equals' DE-9IM relation. Provides a client interface to a server function. See geo.equals
Parameters:
Name Type Argument Description
region1 CtsRegion <optional>
The first geospatial region to compare. This region is the left operand of equals.
region2 CtsRegion <optional>
The second geospatial region to compare. This region is the right operand of equals.
options XsString <optional>
Options to this operation. The default is (). Available options: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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.
Since:
  • 2.1.1
Returns:
Type
XsBoolean

geohashDecode(hash) → {CtsBox}

Given a geohash string, return the bounding box for that hash. Provides a client interface to a server function. See geo.geohashDecode
Parameters:
Name Type Argument Description
hash XsString <optional>
The geohash value, as produced by geo:geohash-encode.
Since:
  • 2.1.1
Returns:
Type
CtsBox

geohashDecodePoint(hash) → {CtsPoint}

Given a geohash string, return the point for that hash. Provides a client interface to a server function. See geo.geohashDecodePoint
Parameters:
Name Type Argument Description
hash XsString <optional>
The geohash string, as produced from the function geo:geohash-encode.
Since:
  • 2.1.1
Returns:
Type
CtsPoint

geohashEncode(region, geohashPrecision, options) → {XsString}

Compute a set of covering geohashes for the given region, to the given level of precision. Provides a client interface to a server function. See geo.geohashEncode
Parameters:
Name Type Argument Description
region CtsRegion <optional>
The region to encode.
geohashPrecision XsInteger <optional>
The desired precision (length of the geohash). The precision should be between 1 and 12. If the precision is less than 1, or unspecified, the default geohash-precision of 6 is used. A geohash-precision greater than 12 is treated as the same as 12. In the worst case (at the equator) a precision of 12 gives resolution of less than a centimeter.
options XsString <optional>
Options for the operation. The default is (). Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. Geohashing is not allowed for non-geodetic coordinate systems. Attempting to use this function with the raw or raw/double coordinate system will result in an XDMP-GEOHASH-COORD error. "precision=string" Use the coordinate system at the given precision. Allowed values: float (default) 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. geohashes=value Specify which geohashes to return. Allowed values: all Return a complete set of covering hashes for the region (boundary + interior). This is the default behavior. boundary Return only geohashes that intersect with the boundary of the region. interior Return only geohashes completely contained in the interior of the region. exterior Return all geohashes disjoint from the region. That is, all geohashes completely contained in the exterior of the region.
Since:
  • 2.1.1
Returns:
Type
XsString

geohashNeighbors(hash) → {MapMap}

Given a geohash string, return hashes for the neighbors. The result is a map with the keys "N", "NE", "E", "SE", "S", "SW", "W", "NW" for the neighbors in those directions. Provides a client interface to a server function. See geo.geohashNeighbors
Parameters:
Name Type Argument Description
hash XsString <optional>
The geohash string, as produced by geo:geohash-encode.
Since:
  • 2.1.1
Returns:
Type
MapMap

geohashPrecisionDimensions(precision) → {XsDouble}

Given a geohash string, return the height and width for the given precision. The result is a pair of double: the height (latitude span) followed by the width (longitude span). Provides a client interface to a server function. See geo.geohashPrecisionDimensions
Parameters:
Name Type Argument Description
precision XsInteger <optional>
The precision. This should be a number between 0 and 12, as with geo:geohash-encode.
Since:
  • 2.1.1
Returns:
Type
XsDouble

geohashSubhashes(hash, which) → {XsString}

Given a geohash string, return the 32 subhashes. Provides a client interface to a server function. See geo.geohashSubhashes
Parameters:
Name Type Argument Description
hash XsString <optional>
The geohash string, as produced from the function geo:geohash-encode.
which XsString <optional>
Which subhashes to return, one of "S","W","N","E","SW","SE","NW","NE" or "ALL". The default is "ALL".
Since:
  • 2.1.1
Returns:
Type
XsString

interiorPoint(region, options) → {CtsPoint}

This function returns a point that is guaranteed to be inside the bounds of the given region. For a given region and set of options, the point returned should be stable from one call to the next. Provides a client interface to a server function. See geo.interiorPoint
Parameters:
Name Type Argument Description
region CtsRegion <optional>
A cts region.
options XsString <optional>
Options include: "coordinate-system=value" Use the given coordinate system. Valid values are wgs84, wgs84/double, etrs89, etrs89/double, raw and raw/double. Defaults to the governing coordinating system. "precision=value" Use the coordinate system at the given precision. Allowed values: float and double. Defaults to the precision of the governing coordinate system. "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.
Since:
  • 2.1.1
Returns:
Type
CtsPoint

intersects(region1, region2, options) → {XsBoolean}

Compares geospatial regions to see if they fulfill the 'intersects' DE-9IM relation. Provides a client interface to a server function. See geo.intersects
Parameters:
Name Type Argument Description
region1 CtsRegion <optional>
The first geospatial region to compare. This region is the left operand of intersects.
region2 CtsRegion <optional>
The second geospatial region to compare. This region is the right operand of intersects.
options XsString <optional>
Options to this operation. The default is (). Available options: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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.
Since:
  • 2.1.1
Returns:
Type
XsBoolean

overlaps(region1, region2, options) → {XsBoolean}

Compares geospatial regions to see if they fulfill the 'overlaps' DE-9IM relation. Provides a client interface to a server function. See geo.overlaps
Parameters:
Name Type Argument Description
region1 CtsRegion <optional>
The first geospatial region to compare. This region is the left operand of overlaps.
region2 CtsRegion <optional>
The second geospatial region to compare. This region is the right operand of overlaps.
options XsString <optional>
Options to this operation. The default is (). Available options: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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.
Since:
  • 2.1.1
Returns:
Type
XsBoolean

parseWkt(wkt) → {CtsRegion}

Returns a sequence of geospatial regions parsed from Well-Known Text format. Provides a client interface to a server function. See geo.parseWkt
Parameters:
Name Type Argument Description
wkt XsString <optional>
A sequence of strings in Well-Known Text format.
Since:
  • 2.1.1
Returns:
Type
CtsRegion

regionAffineTransform(region, transform, options) → {CtsRegion}

Perform an affine transformation on a geospatial region. The transformation is always applied in the raw coordinate system (Cartesian). Provides a client interface to a server function. See geo.regionAffineTransform
Parameters:
Name Type Argument Description
region CtsRegion <optional>
-
transform MapMap <optional>
A sequence of maps that specify the transformation to apply. Each map should contain at least one of the following transform specifications: translation Translate the points of the region by the given amount in the x and y coordinates. The value is a map with the following keys: txAmount to shift the points in the x direction. (Required.) tyAmount to shift the points in the y direction. (Required.) scaling Scale the points of the region by the given amount of the x and y coordinates. The value is a map with the following keys: sxAmount to scale the points in the x direction. (Required.) syAmount to scale the points in the y direction. (Required.) pscPoint to scale relative to. (Optional. Default is the origin.) rotation Rotate the points of the region by the given angle. The value is a map with the following keys: angleAmount to rotate the points (radians). (Required.) protPoint to rotate relative to. (Optional. Default is the origin.) shearing Shear the points of the region by the given amounts. The value is a map with the following keys: shxyAmount of shearing due to x in y direction. (Required.) shyxAmount of shearing due to y in x direction. (Required.) reflection Reflect the points of the region around a line or a point. The value is a map with the following keys: lineRLine of reflection. prefPoint to reflect points around. The value is a map with the following keys: startThe starting point of the line. endThe ending point of the line. Exactly of lineR or pref must be specified. If no transform specifications are provided, the points are transformed by the identity transform. That is, they remain unchanged.
options XsString <optional>
Geospatial options that affect the transformation. Currently there are no relevant options.
Since:
  • 2.1.1
Returns:
Type
CtsRegion

regionApproximate(region, threshold, options) → {CtsRegion}

This function returns a simplified approximation of the region, using the Douglas-Peucker algorithm. Provides a client interface to a server function. See geo.regionApproximate
Parameters:
Name Type Argument Description
region CtsRegion <optional>
A cts region.
threshold XsDouble <optional>
How close the approximation should be, in the units specified by the units option.
options XsString <optional>
Options include: "coordinate-system=value" Use the given coordinate system. Valid values are wgs84, wgs84/double, etrs89, etrs89/double, raw and raw/double. Defaults to the governing coordinating system. "precision=value" Use the coordinate system at the given precision. Allowed values: float and double. Defaults to the precision of the governing coordinate system. "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. Tolerance must be smaller than the value of the threshold parameter.
Since:
  • 2.1.1
Returns:
Type
CtsRegion

regionClean(region, options) → {CtsRegion}

This function fixes various problems with the region or raises an error if it is not repairable. The only relevant fix for MarkLogic is to remove duplicate adjacent vertices in polygons (including inner and outer polygons of complex polygons). The only relevant options are options controlling the coordinate system and the tolerance option. Provides a client interface to a server function. See geo.regionClean
Parameters:
Name Type Argument Description
region CtsRegion <optional>
A cts region.
options XsString <optional>
The tolerance, units, coordinate system. Options include: "coordinate-system=value" Use the given coordinate system. Valid values are wgs84, wgs84/double, etrs89, etrs89/double, raw and raw/double. Defaults to the governing coordinating system. "precision=value" Use the coordinate system at the given precision. Allowed values: float and double. Defaults to the precision of the governing coordinate system. "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.
Since:
  • 2.1.1
Returns:
Type
CtsRegion

regionContains(target, region, options) → {XsBoolean}

Returns true if one region contains the other region. Provides a client interface to a server function. See geo.regionContains
Parameters:
Name Type Argument Description
target CtsRegion <optional>
A geographic region.
region CtsRegion <optional>
One or more geographic regions (boxes, circles, polygons, or points). Where multiple regions are specified, return true if target contains any of the regions.
options XsString <optional>
Options for the operation. The default is (). Options include: Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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 regions' boundaries are counted as matching. This is the default. "boundaries-excluded" Points on boxes', circles', and regions' 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.
Since:
  • 2.1.1
Returns:
Type
XsBoolean

regionDe9im(region1, region2, options) → {XsString}

Calculates the Dimensionally Extended nine-Intersection Matrix (DE-9IM) of two geospatial regions. Provides a client interface to a server function. See geo.regionDe9im
Parameters:
Name Type Argument Description
region1 CtsRegion <optional>
The first geospatial region to compare.
region2 CtsRegion <optional>
The second geospatial region to compare.
options XsString <optional>
Options to this operation. The default is (). Available options: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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.
Since:
  • 2.1.1
Returns:
Type
XsString

regionIntersects(target, region, options) → {XsBoolean}

Returns true if the target region intersects with a region. Provides a client interface to a server function. See geo.regionIntersects
Parameters:
Name Type Argument Description
target CtsRegion <optional>
A geographic region (box, circle, polygon, or point).
region CtsRegion <optional>
One or more geographic regions. Where multiple regions are specified, return true if any region intersects the target region.
options XsString <optional>
Options for the operation. The default is (). Options include: Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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 regions' boundaries are counted as matching. This is the default. "boundaries-excluded" Points on regions' 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.
Since:
  • 2.1.1
Returns:
Type
XsBoolean

regionRelate(region1, operation, region2, options) → {XsBoolean}

Compares geospatial regions based on a specified relationship. For example, determine if two regions overlap. Provides a client interface to a server function. See geo.regionRelate
Parameters:
Name Type Argument Description
region1 CtsRegion <optional>
The first geospatial region to compare. This region is the left operand of $operation.
operation XsString <optional>
The operation to apply between the region specified in the $region-1 and $region-2 parameters. Allowed values: contains, covered-by, covers, crosses, disjoint, equals, intersects, overlaps, touches, within. See the Usage Notes for details.
region2 CtsRegion <optional>
The second geospatial region to compare. This region is the right operand of $operation.
options XsString <optional>
Options to this operation. The default is (). Available options: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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.
Since:
  • 2.1.1
Returns:
Type
XsBoolean

removeDuplicateVertices(region, options) → {CtsRegion}

Remove duplicate (adjacent) vertices. Provides a client interface to a server function. See geo.removeDuplicateVertices
Parameters:
Name Type Argument Description
region CtsRegion <optional>
A cts region.
options XsString <optional>
The tolerance, units, coordinate system. Options include: "coordinate-system=value" Use the given coordinate system. Valid values are wgs84, wgs84/double, etrs89, etrs89/double, raw and raw/double. Defaults to the governing coordinating system. "precision=value" Use the coordinate system at the given precision. Allowed values: float and double. Defaults to the precision of the governing coordinate system. "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.
Since:
  • 2.1.1
Returns:
Type
CtsRegion

shortestDistance(p1, region, options) → {XsDouble}

Returns the great circle distance (in units) between a point and a region. The region is defined by a cts:region. Provides a client interface to a server function. See geo.shortestDistance
Parameters:
Name Type Argument Description
p1 CtsPoint <optional>
The first point.
region CtsRegion <optional>
A region such as a circle, box, polygon, linestring, or complex-polygon. For compatibility with previous versions, a sequence of points is interpreted as a sequence of arcs (defined pairwise) and the distance returned is the shortest distance to one of those points. If the first parameter is a point within the region specified in this parameter, then this function returns 0. If the point specified in the first parameter in not in the region specified in this parameter, then this function returns the shortest distance to the boundary of the region.
options XsString <optional>
Options for the operation. The default is (). Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe raw coordinate system at double precision. "units=value" Measure distance and the radii of circles in the specified units. Allowed values: miles (default), km, feet, meters. "precision=value" Use the coordinate system at the given precision. Allowed values: float and double.
Since:
  • 2.1.1
Returns:
Type
XsDouble

toWkt(wkt) → {XsString}

Returns a sequence of strings in Well-Known Text format. Provides a client interface to a server function. See geo.toWkt
Parameters:
Name Type Argument Description
wkt CtsRegion <optional>
A sequence of geospatial regions.
Since:
  • 2.1.1
Returns:
Type
XsString

touches(region1, region2, options) → {XsBoolean}

Compares geospatial regions to see if they fulfill the 'touches' DE-9IM relation. Provides a client interface to a server function. See geo.touches
Parameters:
Name Type Argument Description
region1 CtsRegion <optional>
The first geospatial region to compare. This region is the left operand of touches.
region2 CtsRegion <optional>
The second geospatial region to compare. This region is the right operand of touches.
options XsString <optional>
Options to this operation. The default is (). Available options: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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.
Since:
  • 2.1.1
Returns:
Type
XsBoolean

validateWkt(wkt) → {XsBoolean}

Returns true if the string is valid Well-Known Text for a supported region type. Provides a client interface to a server function. See geo.validateWkt
Parameters:
Name Type Argument Description
wkt XsString <optional>
A string to validate.
Since:
  • 2.1.1
Returns:
Type
XsBoolean

within(region1, region2, options) → {XsBoolean}

Compares geospatial regions to see if they fulfill the 'within' DE-9IM relation. Provides a client interface to a server function. See geo.within
Parameters:
Name Type Argument Description
region1 CtsRegion <optional>
The first geospatial region to compare. This region is the left operand of within.
region2 CtsRegion <optional>
The second geospatial region to compare. This region is the right operand of within.
options XsString <optional>
Options to this operation. The default is (). Available options: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system with degrees as the angular unit. wgs84/radiansThe WGS84 coordinate system with radians as the angular unit. wgs84/doubleThe WGS84 coordinate system at double precision with degrees as the angular unit. wgs84/radians/doubleThe WGS84 coordinate system at double precision with radians as the angular unit. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe 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.
Since:
  • 2.1.1
Returns:
Type
XsBoolean
Copyright (c) 2020 MarkLogic Corporation Documentation generated by JSDoc 4.0.0 on 2024-01-04T18:17:59-08:00 using the DocStrap template.