Integer value of h3Index
See original GitHub issueHi,
I know that since Js does not support BigInteger this library is returning hex results as index, but is there any safe way to use BigInt
object in js to handle these numbers? since in my case I need to manipulate the indexes.
Issue Analytics
- State:
- Created 3 years ago
- Comments:13
Top Results From Across the Web
H3 Index
An H3Index is the 64-bit integer representation of an H3 index, which may be one of multiple modes to indicate the concept being...
Read more >API reference — h3-py - Uber Open Source
Converts an H3 64-bit integer index to a hexadecimal string. ... The base cell number and the H3Index are two different representations of...
Read more >Encoding Specification - Placekey API Docs
The integer value of the H3 index is modified so that fewer bits (and therefore fewer characters) are required to represent the index...
Read more >Functions for Working with H3 Indexes | ClickHouse Docs
h3kRing(h3index, k). Arguments. h3index — Hexagon index number. Type: UInt64. k — Radius. Type: integer. Returned values. Array of H3 indexes.
Read more >h3_string_to_int: Convert an H3 index string to 64 bit integer
h3_string_to_int takes an h3 index represented as a hexadecimal string and returns the integer format.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
numpy
should be able to handle things up to a few million pretty easily.Here’s an example with
numpy
and a Pythonset
for 100 million 64-bit integers. Both seem fast.The
set
approach looks a bit faster for testing membership, and would definitely be more flexible and efficient around adding/removing members than thenumpy
sorted array.If you’re going the Python route, would a normal python
dict
orset
solve your problem? You might also look at thebisect
module, ornumpy.searchsorted
.Getting a little more sophisticated, you might look at cykhash, which should be quite fast, and can be called from pure Python directly, or from compiled Cython code.
Or, I might be completely missing the point, and there’s a good reason to use a tree over a hash table. 😄