Documentation
¶
Index ¶
- Variables
- func Distance(placeKey1, placeKey2 string) (float64, error)
- func FormatIsValid(placeKey string) bool
- func FromGeo(lat, lng float64) (string, error)
- func FromH3Index(index h3.H3Index) (string, error)
- func FromH3Int(h3Int uint64) (string, error)
- func FromH3String(h3String string) (string, error)
- func GetPrefixDistanceMap() map[int]float64
- func ToGeo(placeKey string) (lat, lng float64, err error)
- func ToGeoBoundary(placeKey string) ([][]float64, error)
- func ToH3Index(placeKey string) (h3.H3Index, error)
- func ToH3Int(placeKey string) (uint64, error)
- func ToH3String(placeKey string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidLatLngRange = errors.New("invalid lat/lng range")
View Source
var ErrInvalidParts = errors.New("invalid parts")
View Source
var ErrInvalidResolution = errors.New("invalid resolution")
Functions ¶
func FormatIsValid ¶
FormatIsValid returns a boolean for whether or not the format of a PlaceKey is valid, including checks for valid encoding of location.
func FromH3Index ¶
FromH3Index converts an H3 index into a PlaceKey string.
func FromH3String ¶
FromH3String converts an H3 hexadecimal string into a PlaceKey string.
func GetPrefixDistanceMap ¶
GetPrefixDistanceMap returns a map of the length of a shared PlaceKey prefix to the maximal distance in meters between two PlaceKeys sharing a prefix of that length.
func ToGeoBoundary ¶ added in v0.2.0
ToGeoBoundary returns the hexagonal polygon boundary of a PlaceKey as a slice of (latitude, longitude) coordinates.
func ToH3String ¶
ToH3String converts a PlaceKey string into an H3 string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.