geo

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DegreesToRadians

func DegreesToRadians(d float64) float64

func RadiansToDegrees

func RadiansToDegrees(r float64) float64

func SemicirclesToRadians

func SemicirclesToRadians(s int32) float64

Types

type Box

type Box struct {
	Min, Max Point
}

func (Box) Center

func (b Box) Center() Point

func (Box) Enclose

func (b Box) Enclose(pt Point) Box

func (Box) IsZero

func (b Box) IsZero() bool

type Circle

type Circle struct {
	Origin Point
	Radius float64
}

func (Circle) Contains

func (c Circle) Contains(pt Point) bool

func (Circle) Enclose

func (c Circle) Enclose(pt Point) Circle

func (Circle) Grow

func (c Circle) Grow(factor float64) Circle

func (Circle) IsZero

func (c Circle) IsZero() bool

func (Circle) String

func (c Circle) String() string

type Point

type Point struct {
	Lat, Lon float64
}

func NewPointFromDegrees

func NewPointFromDegrees(lat, lon float64) Point

func NewPointFromSemicircles

func NewPointFromSemicircles(lat, lon int32) Point

func (Point) DistanceTo

func (p Point) DistanceTo(pt Point) float64

func (Point) IsZero

func (p Point) IsZero() bool

func (Point) MercatorProjection

func (p Point) MercatorProjection() (float64, float64)

func (Point) String

func (p Point) String() string

Jump to

Keyboard shortcuts

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