Documentation
¶
Index ¶
Constants ¶
View Source
const (
MERGE_THRESHOLD = 2
)
Variables ¶
This section is empty.
Functions ¶
func GenerateGeohash ¶
Generate a geohash for the supplied point
func GenerateGeohashFromLatLng ¶
Generate a geohash for the given latitude & longitude
func GenerateHashKey ¶
Generate a DynamoDB hashkey of the given length for the supplied geohash
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
type GeohashRange ¶
func MergeCells ¶
func MergeCells(cellUnion s2.CellUnion) (ranges []GeohashRange)
Merge continuous cells in CellUnion and return a list of merged GeohashRanges.
func (*GeohashRange) TryMerge ¶
func (g *GeohashRange) TryMerge(otherRange *GeohashRange) (merged bool)
Click to show internal directories.
Click to hide internal directories.