2

I have no idea how to find the neighbouring cells of the base cell at a given radius(Km). How can I achieve this? If possible for the h3-go library as I am familiar with Go.

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189

1 Answers1

2

The answer here depends on whether you want a true radius check, or a fast approximation using kRing. You can find a discussion and example code (in JavaScript) in this Observable notebook. The basic algorithm is

  1. Determine the grid cell radius corresponding to the true distance radius you want
  2. Call kRing(origin, gridDistance) to get the set of cells within that gridDistance.

This is much faster than a true radius check, but slightly less accurate.

nrabinowitz
  • 55,314
  • 10
  • 149
  • 165