Skip to content

Neighbour have the same hash value? #2

Description

@JCzz

Hi

Am I doing anything wrong? From the following code I get Hash u neighbours: [u u s g v g e v t]

But how can a neighbour have the same hash value?

package main

import (
    "fmt"
    "github.com/gansidui/geohash"
)

func main() {

    latitude := 68.0
    longitude := 23.0
    precision := 1

    hash, _ := geohash.Encode(latitude, longitude, precision)

    fmt.Println("Hash")
    fmt.Println(hash)
    neighbors := geohash.GetNeighbors(latitude, longitude, precision)
        fmt.Println("neighbours:")
    fmt.Println(neighbors)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions