uber / h3-go

Go bindings for H3, a hierarchical hexagonal geospatial indexing system
https://uber.github.io/h3/
Apache License 2.0
317 stars 60 forks source link

Obtaining a neighboring indexes from a given cell index around a given radius - m or km #48

Closed anjulapaulus closed 3 years ago

anjulapaulus commented 3 years ago

Hi, Is it possible to get the neighboring indexes from a given cell index around a given radius which is either in metres or kms? I have a usecase which requires that? It would be helpful if there is another way to obtain them that using haversine.

nrabinowitz commented 3 years ago

H3 can approximate this very efficiently - see https://observablehq.com/@nrabinowitz/h3-radius-lookup for some approaches here. One option not included there is to use H3 to get an initial candidate set, then use Haversine or similar to accurately check distance.