geo

package
v1.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 1 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BearingTo

func BearingTo(latA, lonA, latB, lonB float64) float64

BearingTo returns the (initial) bearing from point 'A' to point 'B'.

func DegsToSemi added in v1.3.0

func DegsToSemi(degs float64) int32

func DestinationPoint

func DestinationPoint(lat, lon, meters, bearingDegrees float64) (
	destLat, destLon float64,
)

DestinationPoint return the destination from a point based on a distance and bearing.

func DistanceFromHaversine

func DistanceFromHaversine(haversine float64) float64

func DistanceTo

func DistanceTo(latA, lonA, latB, lonB float64) (meters float64)

DistanceTo return the distance in meters between two point.

func DistanceToHaversine

func DistanceToHaversine(meters float64) float64

func Haversine

func Haversine(latA, lonA, latB, lonB float64) float64

func NormalizeDistance

func NormalizeDistance(meters float64) float64

func RectFromCenter

func RectFromCenter(lat, lon, meters float64) (
	minLat, minLon, maxLat, maxLon float64,
)

RectFromCenter calculates the bounding box surrounding a circle.

func SemiToDegs added in v1.3.0

func SemiToDegs(semi int32) float64

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL