Documentation ¶
Overview ¶
Package wgs84 is for distance, bearing, and locality calculations on the WGS84 ellipsoid.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompassShort ¶
CompassShort converts bearing (0-360) to a short compass bearing name e.g., N.
func DistanceBearing ¶
DistanceBearing calculates the distance in km and the bearing in degrees from lat1 lon1 to lat2 lon2 on the WGS84 ellipsoid.
Based on https://github.com/StefanSchroeder/Golang-Ellipsoid
Types ¶
type ByDistance ¶
type ByDistance []Locality
func (ByDistance) Len ¶
func (a ByDistance) Len() int
func (ByDistance) Less ¶
func (a ByDistance) Less(i, j int) bool
func (ByDistance) Swap ¶
func (a ByDistance) Swap(i, j int)
type Locality ¶
func ClosestNZ ¶
ClosestNZ returns the closest New Zealand locality to the input point. Locality.Bearing is from the Locality to the input point.
func LocalitiesNZ ¶
LocalitiesNZ returns New Zealand localities for the input point. Locality.Bearing is from the Locality to the input point.
func (Locality) Description ¶
func (Locality) DescriptionShort ¶
Click to show internal directories.
Click to hide internal directories.