Skip to content

kRing returns invalid indexes #11

Description

@mmpagani

Thanks a lot for developing this package. While working with it I came across an issue that you can reproduce with the code below. It seems that kRing generates some invalid h3 indexes:

using H3.API
using Printf

idx = 0x85300537fffffff
idx = 0x8530158ffffffff
idx = 0x85301dc7fffffff

h3IsValid(idx)
geo = h3ToGeo(idx)
println(rad2deg(geo.lon))
println(rad2deg(geo.lat))

idxs = kRing(idx, 15);
println(length(idxs))

for i in idxs
    if !h3IsValid(i)
        print(@sprintf("wrong index 0x%08x \n", i))
        geo = h3ToGeo(i)
    end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions