uber / h3

Hexagonal hierarchical geospatial indexing system
https://h3geo.org
Apache License 2.0
4.83k stars 459 forks source link

cell_to_child_pos() version 4 of the Python API client #794

Open kylelindgren opened 10 months ago

kylelindgren commented 10 months ago

I'm trying to recover the absolute position of a neighbor with respect to a center cell (i.e. 1-6 index) and thought the cell_to_child_pos() function would be useful for this, following the definition in the docs. However, the function doesn't appear to exist in '4.0.0b1' or '4.0.0b2'. Looking for clarification on the state of this function or any other solutions to achieving this absolute position recovery.

isaacbrodsky commented 10 months ago

Unfortunately that function was introduced in version 4.1.0 and I do not believe a new Python binding version has been released since that. When the Python bindings are updated that function should be included, as it is part of the H3 API.

Cc @ajfriend

kylelindgren commented 10 months ago

Thank you for the quick response. Couple of follow-ups:

nrabinowitz commented 10 months ago

Thank you for the quick response. Couple of follow-ups:

  • Is there an anticipated release date for 4.1.0 Python bindings?
  • cell_to_local_ij() is available with 4.0.x but I'm not understanding the output. Can you point me to more documentation than what's here?

You can see some discussion of the coordinates here, but we don't have more docs that I know of. Essentially cell_to_local_ij gives you 2d axial coordinates you can use to traverse cells in a limited, local space (generally speaking, on the same or adjacent faces of the icosahedron). This is an advanced feature, and in general better avoided because of the limitations in the coordinate system it returns, but it can be very useful in some cases, e.g. applying ML or computer vision algorithms that require 2d matrix input.