MI_Bearing - spectrum_spatial - Latest

Spectrum Spatial Guide

Product type
Software
Portfolio
Locate
Product family
Spectrum™ software
Product
Spectrum™ software > Spatial > Spectrum Spatial
Version
Latest
ft:locale
en-US
Product name
Spectrum Technology Platform
ft:title
Spectrum Spatial Guide
Copyright
2025
First publish date
2007
ft:lastEdition
2026-02-13
ft:lastPublication
2026-02-13T17:17:07.540000

Description

Returns the initial bearing from starting point (point1) to an ending point (point2) from two point geometries.

Syntax

MI_Bearing ( point1, point2 ) returns polar bearing (default scale) as Double

MI_Bearing ( point1, point2, scale) returns polar bearing in required scale as Double

MI_Bearing ( point1, point2, scale, format) returns quadrant bearing as String

Arguments

point1 is the starting point geometry

point2 is the ending point geometry

scale is the count of decimal digits in the fractional part (>=0 default is 1)

format is the output format of Quadrant Bearing. (d - Degrees, dms - Degrees/Minutes/Seconds)

Example

Returns the bearing as Polar direction

MI_Bearing(MI_POINT(-94.581213, 39.099912,'epsg:4326'), MI_POINT(-90.200203, 38.627089,'epsg:4326'), 2) 
returns a Double 96.51

Returns the bearing as quadrant bearing, in Degrees format

MI_Bearing(MI_POINT(-94.581213, 39.099912,'epsg:4326'), MI_POINT(-90.200203, 38.627089,'epsg:4326'), 2, 'd') 
returns a String S83.49°E

Returns the bearing as quadrant bearing, in Degrees/Minutes/Seconds format

MI_Bearing(MI_POINT(-94.581213, 39.099912,'epsg:4326'), MI_POINT(-90.200203, 38.627089,'epsg:4326'), 2, 'dms') 
returns a String S83°29'14.55"E

Remarks

Note:
  • Bearing is measured from 0 degrees to the north, moving in a clockwise direction.
  • Bearing is always returned in the WGS84 coordinate system and is the initial bearing from the start point based on a spherical calculation (great circle line).