uber / uber/h3

Is there a method to validate that a list of hexagon IDs are one contiguous bloc?

Open
#718 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
6.5k
Forks
627
Avg merge
3d 21h
Merged PRs (30d)
6

Description

I'm looking for a way to validate if a list of cell id's (all same resolution) is a contiguous bloc (single island of hexagons).
My use case is a map-picker where the user selects multiple hexagons but the selection must constitute one contiguous bloc.
My initial thought was to use h3.are_neighbor_cells (https://uber.github.io/h3-py/api_reference.html#h3.are_neighbor_cells but then I realised that not every cell has to be neighbours with every other cell to satisfy this contiguous bloc requirement.

Is there a method to perform such a check?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the h3.are_neighbor_cells API reference and the H3 repository's existing cell-neighbor entry points. Determine whether connectivity for same-resolution IDs is already exposed; done means a documented, reproducible way to validate one connected selection, or a clearly scoped feature request.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.