Loading TOC...

geo.bearing

geo.bearing(
   $p1 as cts.point,
   $p2 as cts.point,
   [$options as String[]]
) as Number

Summary

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.

Parameters
$p1 The first point.
$p2 The second point.
$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.
"tolerance"
A tolerance value. For the raw coordinate system, use the units of the coordinate system. For other (geodetic) coordinate systems, use the units specified by the units option. If the tolerance is too fine for the precision, inconsistencies may result and a larger tolerance should be used.

Example

var sf = cts.point(37, -122);
var ny = cts.point(40, -73);
geo.bearing(sf, ny);

=> 1.2212785952625

Comments

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