h3-js icon indicating copy to clipboard operation
h3-js copied to clipboard

hexArea & edgeLength don't allow rad units

Open MatixYo opened this issue 2 years ago • 1 comments

The documentation clearly states that functions edgeLength and hexArea allow for second parameter to be UNIT.rads for edgeLength or UNIT.rads2 for hexArea. However when calling these functions:

h3.edgeLength(12, h3.UNIT.rads);
h3.hexArea(12, h3.UNIT.rads2)

an error is thrown:

Unknown unit: rads

Unknown unit: rads2

MatixYo avatar Mar 24 '22 13:03 MatixYo

Thanks for logging. This is a documentation issue - at present, the core H3 library does not support edgeLengthRads or hexAreaRads2 (though cellArea supports rads2, which seems to be missing from the docs).

nrabinowitz avatar Mar 24 '22 22:03 nrabinowitz