Skip to content

Unable to convert cell Id to lat lng #448

@akkharolia

Description

@akkharolia

cell_id = 600090378170794000

the above cell is converted using h3-js successfully, in python it gives invalid cell ID error.
I tried with all function of h3-py i.e. api functions(basic_int, basic_str etc).

also found that python hex output is different from javascript output. So created below function to match the output.

def _hex(num):
rounded = int(float(num))
return hex(rounded)[2:].lower()

I'm using below function to convert to lat lng.
h3.cell_to_latlng

Still getting error of invalid cell ID.

Another Cell ID: 601803032887296000

h3-py version: 4.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions