geoset

package
Version: v0.0.0-...-bb3eb04 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeoSet

type GeoSet struct {
	// contains filtered or unexported fields
}

GeoSet is a collection that allows for values to be stored by their latitude and longitude; and allows for lookups to find the entry closest to the supplied latitude and longitude.

func NewGeoSet

func NewGeoSet() *GeoSet

NewGeoSet returns a new GeoSet

func (*GeoSet) Add

func (gs *GeoSet) Add(lat float64, lon float64, value interface{})

Add the supplied value to the location specified with the latitude and longitude (in degrees)

func (*GeoSet) Closest

func (gs *GeoSet) Closest(lat float64, lon float64) interface{}

Closest returns the entry in the set that is nearest to the supplied latitude and longitude (in degrees)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL