Heading()

Summary

Returns the azimuth of the AB or BA direction of a line.

Changes

Added to Version 2014.

Syntax

Heading(int id, array options)

Argument Contents
id The integer ID of the line
Option Type Contents
Direction String "AB" (the default) or "BA"
Position String "End to End" (the default), "A Node" or "B Node"
Threshold Real The distance from the node to the next shape point

Returns

A real number indicating the azimuth in degrees, from 0 (due north) to 360 (measured clockwise).

Notes

  • The Position option specifies whether you want the heading at one end of the link based on shape points near the A or B node, or "End to End" (the default) to calculate the azimuth based on the endpoints.

  • The Threshold option can be used when the Position option is "A Node" or "B Node." The heading will be computed between the coordinate of the node and that of the first shape point that is a minimum distance, determined by the Threshold value, from the node.

See Also

Function Summary
Azimuth() Computes the azimuth (heading) for a line between two points
GetDistance() Computes the great circle distance between two coordinates