geohash

package
v0.0.0-...-5990362 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(code uint64) (float64, float64)

Decode converts uint64 geohash code to latitude and longitude

func Distance

func Distance(latitude1, longitude1, latitude2, longitude2 float64) float64

Distance computes the distance between two given coordinates in meter

func Encode

func Encode(latitude, longitude float64) uint64

Encode converts latitude and longitude to uint64 geohash code

func FromInt

func FromInt(code uint64) []byte

FromInt converts uint64 geohash code to bytes

func GetNeighbours

func GetNeighbours(latitude, longitude, radiusMeters float64) [][2]uint64

GetNeighbours returns geohash code of blocks within radiusMeters to the given coordinate

func ToInt

func ToInt(buf []byte) uint64

ToInt converts bytes geohash code to uint64 code

func ToString

func ToString(buf []byte) string

ToString converts bytes geohash code to base32 string

Types

This section is empty.

Jump to

Keyboard shortcuts

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