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.
73
questions
1
vote
2
answers
19
views
How to calculate the average distance between 2 neighboring H3 Cells?
I'm using the Uber H3 Library for Java https://github.com/uber/h3-java
I'm trying to figure out what is the average distance between 2 neighboring H3 cells of resolution 15 (the distance between their ...
0
votes
0
answers
40
views
PostgreSQL performance issues with aggregation
I have a query that runs very slowly (about 40 seconds) it looks like this:
SELECT
h3data.h3index,
sum(h3data.value)
FROM locations l
INNER JOIN records ...
0
votes
1
answer
45
views
Given H3 cells from polyfill, how to identify cells which are fully contained, partially contained or contiguous with the polygon?
As mentioned in the accepted answer on how to identify hexagons which overlap, i am confused as to how we can identify fully contained, partially contained or contiguous cells of a polygon (check if ...
0
votes
2
answers
81
views
calculate distance between latitude longitude columns for pandas data frame
I am trying to apply this code:
import h3
coords_1 = (52.2296756, 21.0122287)
coords_2 = (52.406374, 16.9251681)
distance = h3.point_dist(coords_1, coords_2, unit='km')
distance
to a pandas ...
0
votes
0
answers
32
views
Why is my geodataframe failing to reproject or buffer?
PROBLEM: I am attempting to fill the extent of a shapefile with h3 polygons (resolution 4). Polyfill was giving us the incorrect amount of polygons (was only including polygons whose geographic center ...
1
vote
0
answers
43
views
Build failed - h3
Installing h3 throws back an error
pip install h3
Error log when trying to install h3 (uber-api). Building failed is what I got in multiple attempts. Try to help me with some solution
Collecting h3
...
0
votes
1
answer
26
views
h3Line function throws LineUndefinedException
I want to calculate index of the h3 cells between (-39.08, -57.01) and (-38.05, -58.16) but it throws LineUndefinedException.
In the documentation it says
This function may fail to find the line ...
0
votes
2
answers
468
views
How to polyfill a Multi-polygon in H3?
I have a set of multipolygons in GeoJSON format, for example:
{
"type": "MultiPolygon",
"coordinates": [
[[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0],...
0
votes
0
answers
85
views
splitting the world map into grids with h3
<script>
mapboxgl.accessToken = 'pk.eyJ1IjoiYWhtZXRiYXlyYWtjaSIsImEiOiJja3lqN2lzemwxcDZnMzBxcDZ3OHVrdjU5In0.jgPDOZKWtnkHlZiinlNK6Q';
const map = new mapboxgl.Map({
...
0
votes
1
answer
63
views
How to find point (lat, lng) inside a polygon with h3-js?
I have a polygon created with polyfill, is it possible to know if the point = [lat, lng] is in that polygon (using only h3-js)?
0
votes
1
answer
80
views
Is it possible to map the H3 indexing structure to an incrementing integer start from 0?
I am having some trouble understanding all the info in the H3 indexing docs. For those who are new to H3, it is a "Hexagonal hierarchical geospatial indexing system" recently released from ...
0
votes
1
answer
110
views
Where is the origin that maps the base hexagons in Uber's H3 Hexagonal hierarchical geospatial indexing system to the globe?
I just learned about H3 and would like to basically get the "standard reference" point, referencing each hexagon (and the 12 pentagons) at each resolution, and then determine what the lat/...
1
vote
1
answer
80
views
calculating geospatial indexes for h3 at any given resolution
I am just starting out with Uber's h3geo (JavaScript), and am getting half the number of indexes at every resolution than what the docs suggest.
const nw = [-180, 90];
const ne = [ 180, 90];
const ...
1
vote
1
answer
99
views
H3 getting started
I'm new to geospatial indexing and found H3 to be really interesting. Currently messing around with the several different functions on API, but my question is how do I render the H3 cells to a map?
...
0
votes
1
answer
99
views
using H3 to get the closest vehicles to a geolocation
I'm developing a system, where I have a list of 100000 geolocations and 10000 geolocations of cars that are moving, and every X seconds, the vehicle's location update occurs, that is, at the same time ...
0
votes
1
answer
224
views
h3 polyfill returns empty list
I have two different Polygons
poly1 = {'type': 'Polygon',
'coordinates': [[[37.813318999983238, -122.4089866999972145],
[ 37.7866302000007224, -122.3805436999997056 ],
[37.7198061999978478, -122....
0
votes
0
answers
167
views
How to add h3 (Hexagonal Hierarchical Spatial Index) to Scala in build.sbt?
I have cloned the h3 repository from https://github.com/uber/h3 and installed version 3.7.0 as per the instructions.
My build.sbt currently looks like
name := "Lab 1"
version := "1.0&...
0
votes
1
answer
47
views
H3 geo addressing scheme based on aperture 7 hierarchy
using h3geo grid system, i was curious if it would be possible to create an addressing scheme based on the aperture 7 hierachy?. eg 121.0.1.2.3.4.5.6 etc.
The first number is the base cell and the ...
1
vote
1
answer
48
views
Implicit conversion error C# netstandard2.1
I'm trying to port some code from Net5.0 to Netstandard2.1, but running out of C# knowledge.
I am trying to rewrite this function
public static readonly Dictionary<Direction, CoordIJK> ...
0
votes
1
answer
92
views
AWS Glue Python Shell Import H3
Am trying to import h3 into a Python Glue Shell job, have downloaded the .whl file from https://pypi.org/project/h3/#files but am getting the following error: ModuleNotFoundError: No module named 'h3....
1
vote
1
answer
63
views
How would I modify the H3 library to change the base cell orientation?
The H3 library uses a Dymaxion orientation, which means that the hexagon grid is rotated to an unusual angle relative to the equator/meridian lines. This makes sense when modelling the Earth, as the ...
0
votes
0
answers
115
views
Coloring individual H3 map hexes
I'm trying to display a map, overlay with a hex grid, and color in hexes based on certain criteria (to be calculated on the fly; it's not a static dataset), using Geopandas and H3.
The display with ...
1
vote
1
answer
496
views
Drawing a hex grid over a Geopandas map
I'm trying to draw a hex grid over a world map. The latter can be done easily enough with Geopandas:
import geopandas
import matplotlib.pyplot as plt
world = geopandas.read_file(geopandas.datasets....
1
vote
1
answer
125
views
conda install h3 still fails on import
I have tried to install the h3 package, and it seemed to work:
(torch) C:\alpha\map>conda install -c conda-forge h3
Collecting package metadata (current_repodata.json): done
Solving environment: ...
0
votes
1
answer
351
views
How to find a locations inside a Polygon with multiple data points and inside a circle with centroid lat/long, radius using uber h3-js?
I am working on a bike-sharing application where I have the following requirements.
Show all bikes near the user locations in a certain radius.
For this I came with an approach where get all indexes ...
0
votes
1
answer
277
views
How to create a PolygonRDD from H3 boundary?
I'm using Apache Spark with Apache Sedona (previously called GeoSpark), and I'm trying to do the following:
Take a DataFrame containing latitude and longitude in each row (it comes from an arbitrary ...
1
vote
2
answers
569
views
using h3 library with pyspark dataframe
I have a spark dataframe that looks like this:
+-----------+-----------+-------+------------------+----------+--------+--------+--------+--------+
|client_id_x|client_id_y| dist| time| ...
1
vote
2
answers
671
views
Can Uber h3 cover the entire globe in hexagonal grid?
Uber has released h3, a framework for efficiently handling big data in the geospatial file. Using h3, I attempted to get the location of a hexagonal grid location as shown in the figure.
(https://eng....
2
votes
0
answers
425
views
How to create H3 shapefiles in a particular area to use in Tableau
I'd like to visualize some point data in Tableau and create a density map using H3 hexagons at resolutions 4 through 10. I haven't been able to find a way to create the shapefiles I need using Python, ...
0
votes
1
answer
257
views
Get resulting hex data from Hexagon layer in h3
I've been using the deck.HexagonLayer with great success. Here is a screenshot of how we display http requests on a weekly basis:
Currently its an array of weeks data = new Array(51).fill(...
1
vote
1
answer
317
views
How to find the neighbour indexes/cells of a base cell at a given radius(Km) in the H3 library
I have no idea how to find the neighbouring cells of the base cell at a given radius(Km). How can I achieve this? If possible for the h3-go library as I am familiar with Go.
2
votes
1
answer
108
views
How can I get vertices for only the outside edges of a hexRing() in H3?
The gist of this is pretty straight forward, even if the implementation isn't...
I want to get the outside edges of a hexRing, as opposed to all edges of the hexagons. Pretty much creating a single ...
0
votes
0
answers
72
views
H3 geo overlay for Android
Is it possible to draw H3 (https://www.gislounge.com/h3-open-source-geospatial-indexing-system/) geo overlay for android?
Maybe some maps API supporting this layer? I know that for example you can ...
0
votes
1
answer
510
views
How to install "h3" library for H3 geospatial indexing system in R
My understanding is that the "H3 geospatial indexing system" is a kind of "coordinate system" developed by Uber, whose main feature is that it is based on a system of hierarchical ...
5
votes
1
answer
986
views
H3 hexagons not matching
I'm trying to use the polyfill function with the Python's h3 implementation, but I'm recieving unexpected results.
If I use the function with fixed resolution, I can get and show a polygon grid as ...
0
votes
1
answer
331
views
Is there a way to find the geo coordinates of all the buildings in a city?
I am working with the Uber H3 library. Using the poly fill function, I have populated an area with H3 indexes for a specific resolution. But I don’t need all the indexes. I want to identify and remove ...
0
votes
1
answer
115
views
Better pentagon/hexagon area ratio
In the Goldberg polyhedron used in H3 {5+,3}_{a,b} with {a,b}={2,2} or {8,2}, the pentagon area to hexagon area ratio is of about 0.66.
Do you know a way that I can modify a little the pentagon shape (...
1
vote
1
answer
348
views
Uber H3 geoToH3 is not working in React Native
I am developing simple grid location based application in React Native using Uber H3. I installed H3 by
npm install h3-js. Then
I created a file to read H3Index from latitude and longitude.
import ...
4
votes
3
answers
4k
views
How to convert shapefile/geojson to hexagons using uber h3 in python?
I want to create hexagons on my geographic map and want to preserve the digital boundary specified by the shapefile/geojson as well.
How do I do it using uber's h3 python library?
I'm new to ...
1
vote
1
answer
504
views
Why i am gething different h3 index with same latitude and longitude
I am working with a SQlite hexagon index database and other information, the Hexagons index is the primary key. This database is generated by code written in python, and other codes written in C use ...
1
vote
1
answer
117
views
Is H3 adequate for generic sphere tilling?
Is it possible to use the H3 grid system for celestial tilling? I want to use the (alpha, delta)=(right ascension, declinaison) coordinate system (equatorial coordinate system) to assign a point/...
3
votes
1
answer
792
views
How to identify the hexagons which overlap with a given geofence?
The H3 API reference introduced polyfill, the idea of which is "a point-in-poly operation on every hexagon in a k-ring defined around the given geofence". The questions are:
I don't ...
1
vote
0
answers
410
views
Scala: H3 Indexes - multiPolygonToH3 function
I’ve been doing this tutorial: https://databricks.com/notebooks/geomesa-h3-notebook.html
The polygon function (polygonToH3) works perfectly but however the multi polygon function is giving strange ...
0
votes
2
answers
535
views
How to import h3-py (uber) on windows after installing it?
I want to ask about h3-py installation on windows
I have tried to install h3 on windows with python
I ran the command pip install h3 and it is installed.
After install, when I try to import it, i ...
2
votes
1
answer
1k
views
h3-js in a web worker: document is not defined
I'm trying to use h3-js inside a web worker. The error I get is:
Uncaught ReferenceError: document is not defined
at libh3-browser.js:6
at Module../node_modules/h3-js/dist/browser/h3-js.es.js ...
0
votes
1
answer
405
views
H3 DGGS : General questions
Good afternoon,
I'm a newbie to H3. Before reading deeply the documentation and go further on tests with H3, I'm taking the liberty to ask you general questions regarding H3.In advance sorry if my ...
1
vote
1
answer
126
views
How many possible H3 GeoBoundary vertex configurations are there?
When getting the vertices of an H3 cell using H3toGeoBoundary, how many possible vertex configurations can the GeoBoundary struct produce? I count four:
6 vertices: regular hexagon
5 vertices: ...
1
vote
1
answer
362
views
Best way to determine actual H3 hexagon size?
What is the best way to get the actual size of an H3 hexagon (area or edge length) given an H3Index and not the average constant provided by the H3 API?
0
votes
2
answers
149
views
Adding C binding to H3 Rust library
I'm attempting to add the kRing function (amongst others) to an existing Rust project that implements a C-binding of the Uber H3 library. Here's the original source: https://github.com/scottmmjackson/...
0
votes
1
answer
80
views
Calculate surrounding index keys
I'm attempting to retrieve H3 index keys directly adjacent to my current location. I'm wondering if this can be done by mutating/calculating the coordinate directly or if I have to use the library ...