[Python] get centroid latitude and longitude of h3 hexagon

Discussão em 'Python' iniciado por Stack, Maio 23, 2025.

  1. Stack

    Stack Membro Participativo

    I know ho to get h3 hexagon ids for various resolutions and add them to a pandas dataframe containing latitudes and longitudes. Is it possible to get the centroid latitude and longitude of each h3 hexagon given its id? I saw function but do not know how to use it in this context cell_to_latlng. Any pointers would be very much appreciated. thanks.

    PS:

    import h3
    dir(h3)


    does not show cell_to_lat_lng btw?!

    This does not work:

    from h3 import h3

    h3.cell_to_lat_lng('88396c0331fffff')


    I get:

    AttributeError: module 'h3.api.basic_str' has no attribute 'cell_to_lat_lng'

    Continue reading...

Compartilhe esta Página