Questions tagged [h3]

H3 is an open source geospatial indexing system using a hexagonal grid that can be subdivided into finer and finer hexagonal grids.

Features

  • Simple, fast api for converting between lat/long coordinates and hexagon addresses
  • Multiple hexagon resolutions with hierarchical relationships between them
  • A library of common algorithms including neighbor traversal, compact and uncompact transformations, and converting between hexagon sets and polygons

The library is written in C with bindings available for other languages.

120 questions
1
vote
2 answers

How do I convert an H3 ID from hex to integer back and forth in JS

When in Javascript I do: h3Int = parseInt("8B2A100D1D98FFF",16) //626740323050688500 h3Int.toString(16).toUpperCase() // 8B2A100D1D99000 So does not seem to get me the same result in both directions Any idea?
jatorre
  • 1,025
  • 1
  • 8
  • 6
1
vote
1 answer

How can I get the H3 hexagons on a react-map-gl/deck.gl viewport?

I want to query for data based on the H3 hexagons that are visible on the viewport (and for new data on each viewport change). Is there anyway to achieve this with react-map-gl and deck.gl?
MV7
  • 65
  • 7
1
vote
1 answer

Wrong H3 index from go library

I'm currently trying to use uber H3 library to replace S2, but at the moment and with a couples of test it seems that the golang bindings doesn't give me back the right coords from a h3 index ... when using the cmd line binaries with the same data…
JonathanChaput
  • 334
  • 1
  • 4
  • 9
1
vote
1 answer

Is the H3Index ordered?

Is the return value of java api kRingDistances orderly? Does the H3Index of two adjacent cells have other H3Index? for example,List> result = h3.kRingDistances(index, k) here is the result: [[613344576152797183], [613344576150700031,…
1
vote
1 answer

typescript declaration: module detection and namespace

I am trying to write a declaration file for h3. Please see the function reference. First, I am not sure how typescript detects the definition files. It detects my definition, if placed on a folder /src/@types/.d.ts, with the below…
bsr
  • 57,282
  • 86
  • 216
  • 316
1
vote
1 answer

How to use the new H3 layer

I've checked out the newest code in the github master branch of kepler.gl and I'm running the demo. But I don't see the H3HexGrid layer option. How do I use it? The git commits seem to indicate it can be used in the demo app. Also how do I load…
0
votes
0 answers

H3 api call edgeLength always throws exception

I'm tasked migrating a java application using H3 api version 3.6.0 to 4.1.1, and I've been dropped into this application and don't know how the api works. There is a call to the method edgeLength that worked in version 3, but I cannot get any…
Scott
  • 458
  • 4
  • 10
0
votes
1 answer

How to reproduce the same cell pattern around different indexes?

I am using H3 spatial index implementaion h3o. I want to encode a local cell pattern to draw it around a given index. The first problem is that I am inevitably going to fight pentagons, but I don't care about warping the pattern around them. So…
FrogOfJuly
  • 125
  • 3
0
votes
0 answers

H3 Geospatial Index's Projection and Aperture Selection

Interested in the H3 design. From my understanding, the H3 is using azimuthal equidistant projection, which preserves distance and direction from a central point, but brings the area distortion. H3 is trying to balance the area distortion and…
jingking
  • 11
  • 3
0
votes
1 answer

JS: How to divide a bounding box into two smaller bounding boxes

We are using H3Js library (https://github.com/uber/h3-js) to fetch the H3Cells based on boundingBox (First converting into polygon and using polygonToCells method). For bigger screens (4k resolutions), this method polygonToCells is responding with…
himanshupareek66
  • 766
  • 10
  • 22
0
votes
1 answer

BigQuery JavaScript UDF: How to resolve "Cannot use import statement outside module" for h3-js library

Trying to use the Uber H3 API available on GitHub, there's an option for JavaScript. According to BigQuery documentation, this appears to be pretty straight forward on how to reference an external library and a function within in it. The line…
Chad Harrison
  • 2,836
  • 4
  • 33
  • 50
0
votes
0 answers

bundled h3-js reference not executing or throwing error in my js file

Wrote a main.js file which contained: var h3 = require("h3-js") bundled it into a file h3bundled.js using browserify. placed that file in my project In my html, I load two files, starting with h3bundled
Nick
  • 58
  • 6
0
votes
1 answer

Send non blocking call to another API after serving an api request in Nuxt3?

I want to make a request to a logging service after serving the request. For eg you hit an endpoint '/hello' i want to increment count in redis but after serving the request. Something similar to res.on('final') in express.js. I tried searching the…
No Name
  • 98
  • 1
  • 11
0
votes
0 answers

Can I download/access a full table of H3 Index (resolution 11) with the corresponding lat and long by using Python H3 library?

I want to download a full table of H3 Index (resolution 11) with the corresponding lat and long of the United States by Python H3 library. I want to import the data table to my company's database and join it to our customer records. I tried to look…
Lily
  • 1
0
votes
1 answer

Get h3 hex id using Databricks Mosaic library

I am testing the Databricks Mosaic Spatial Grid Indexing method to obtain the h3 hex of a given lat, long. # Get the latitude and longitude latitude = 37.7716736 longitude = -122.4485852 # Get the resolution resolution = 7 # Get the H3 hex…
kms
  • 1,810
  • 1
  • 41
  • 92