uber / h3

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

Update average edge lengths #749

Closed mciethan closed 1 year ago

mciethan commented 1 year ago

I recomputed average edge lengths for all H3 resolutions, building off of the proposed methodology and example notebook provided by @ajfriend in #666 (which involves calculating exact averages for resolutions 0 through 6 and then extrapolating the rest). This would help fix #526 and other issues related to average edge lengths.

Source notebook: https://gist.github.com/mciethan/3e10802c1f41972831c325994d97ef27

My initial commit to this PR only modifies the restable docs. I haven't attempted to modify the average edge length function itself, although it would make sense to do that before updating the docs. I assume that would just be a matter of updating the hard-coded values, but I am a novice of H3 and also don't know any C programming, so I don't have a good understanding of exactly which files would need to be updated, how to test the changes, etc.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

coveralls commented 1 year ago

Coverage Status

Coverage: 98.657%. Remained the same when pulling 8e155a1d5ab55b9338cb310fe704dd005f6c5163 on mciethan:master into 03d6f3d8a19829526e2a72b1f0ed3bf498dd974d on uber:master.

nrabinowitz commented 1 year ago

This looks great, thanks for the contribution! I'll let @ajfriend check the approach here, but it LGTM. I believe you're correct that all we would need to do in code is modify the hard-coded values, feel free to add that to this PR.

mciethan commented 1 year ago

Sounds good, I went ahead and updated the hard-coded average edge length values in my latest commit. I rounded all values to 10 significant digits, as the original code does.

ajfriend commented 1 year ago

Looks good to me! And just as a quick sanity check, I made a plot with the interpolated values:

Screenshot 2023-03-23 at 2 20 06 PM