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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

Converting an LineString to h3 hexagons using srai

I try to convert an shapely LineString to a sequence of h3 hexagons. For that task srai offers the funciton h3_to_geoseries unfortunately the function runs into the following error message: ...
Simon's user avatar
  • 101
0 votes
0 answers
20 views

uploading geoDataFrame as .shp in GEE : multipolygon grid crossing the antimeridian

I have created a multipolygon grid covering the entire globe using h3 library. from the code below from shapely import Polygon, multipolygons from geopandas import GeoDataFrame as gdf from h3 import ...
madeleine's user avatar
1 vote
1 answer
64 views

H3 Cell gridDistance limitations

In the docs for gridDistance is the following sentence "Finding the distance can fail because the two indexes are not comparable (different resolutions), too far apart, or are separated by ...
Michael Houlihan's user avatar
0 votes
1 answer
47 views

What rules are used to define the i j k axes of an icosahedron face?

Hi,I'm reading source code of H3 (v4.1.0) and in the file "faceijk.c" I find these codes on lines 86~130; According to the comments, the variable "faceAxesAzRadsCII" is used to ...
Quenton's user avatar
0 votes
1 answer
140 views

method polygon_to_cells seems to not exist in H3 library

From the Uber h3 api documentation page (https://uber.github.io/h3-py/api_reference.html#), they have a method called: polygon_to_cells which is suppose to transform a given Polygon to a H3 index ...
Gabriel's user avatar
  • 490
0 votes
0 answers
24 views

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 ...
Scott's user avatar
  • 458
0 votes
1 answer
52 views

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 ...
FrogOfJuly's user avatar
2 votes
0 answers
72 views

H3-go library not running

I am newbie to golang who usually uses python. what I did: copied sample from https://github.com/uber/h3-go pasted it in local machine Run go run main.go which was the code placed. The output: github....
Adven a5k's user avatar
-1 votes
1 answer
65 views

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 ...
jingking's user avatar
0 votes
1 answer
94 views

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),...
himanshupareek66's user avatar
0 votes
1 answer
254 views

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 ...
Chad Harrison's user avatar
0 votes
0 answers
42 views

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 ...
Nick's user avatar
  • 70
0 votes
1 answer
102 views

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....
No Name's user avatar
  • 98
0 votes
1 answer
50 views

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 ...
Lily's user avatar
  • 1
0 votes
1 answer
192 views

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 ...
kms's user avatar
  • 1,890
0 votes
0 answers
31 views

Determination of rectilinear movement by means of analysis of hexagons H3

There is a task, it is necessary to determine rectilinear movement among the transmitted GPS coordinates (without any binding to roads, water bodies, etc.). I converted the received GPS coordinates ...
Dmitry Polyanskiy's user avatar
0 votes
2 answers
1k views

Nuxt 3 - after response middleware

I have a use-case where I would like to call a middleware after the response went through the route handler. The docs describe that the standard server middleware only runs BEFORE the request is ...
Schutt's user avatar
  • 1,084
2 votes
1 answer
190 views

Spark DataFrame apply Databricks geospatial indexing functions

I have a spark DataFrame with h3 hex ids and I am trying to obtain the polygon geometries. from pyspark.sql import SparkSession from pyspark.sql.functions import col, expr from pyspark.databricks.sql....
kms's user avatar
  • 1,890
0 votes
2 answers
209 views

NUxtjs3 [nitro] [dev] [uncaughtException] TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or

I updated nuxtjs application version 3.2.0 to 3.4.3. now when a client call server api (which calling a backend server) i have this exception [nitro] [dev] [uncaughtException] TypeError [...
cyril's user avatar
  • 912
0 votes
2 answers
622 views

nuxt3 server api readMultipartFormData not working in lambda

I'm working on a nuxt3 project to allow users to upload files(img, video, audio) and upload to AWS S3 at the same time. In the vue file, I declare a formData and append the file and other parameters ...
AngusHo53's user avatar
0 votes
0 answers
41 views

difference of distance functions in h3_distance function in python h3 geo version 3.x

I am getting confused by some h3 distance functions. let's say I am trying to get all the cellID from a base cellID in 1 miles. I find all the function below from h3 website (https://h3geo.org/docs/3....
milton's user avatar
  • 101
0 votes
1 answer
229 views

measure of h3_distance function in python h3 geo version 3.x

I am new to the h3 geo module in python, I find myself really confused on some definition. let's assume my resolution is set to 10 all the time when I do h3.h3_distance(A, B), it returns me an number, ...
milton's user avatar
  • 101
0 votes
0 answers
28 views

How to set nearby active indexes(hexagons) and get same active indexes(hexagons) within 1km in h3js

const activeIndexes = new Set(); newIndexes.forEach((index) => { cellToVertex(index, { 'active': true }); activeIndexes.add(index); }); const compactedIndexes = compactCells(Array....
goairx tech's user avatar
0 votes
1 answer
715 views

H3 - How to get the H3 index of all cells that are at least partially inside a bounding box/polygon

I would like to get the h3 cell index of every cell that is at least partially within a bounding box. I have been using h3.polygonToCells() but it appears that h3.polygonToCells() only returns cells ...
jam3's user avatar
  • 129
1 vote
1 answer
32 views

Safe to truncate .in file extension for C header file?

I've imported a C library into my Swift project (in Xcode) from Uber's H3 (their geospatial library). Everything works as expected, however, the main header file has a .in file extension suffix which ...
lurning too koad's user avatar
1 vote
1 answer
703 views

Converting h3 hex id to polygon in python

I'm trying to take a h3 hex id and convert it to a polygon to use in a geodataframe (and eventually export as a shapefile). All of the methods in h3 documented online don't seem to work for me, and ...
Geoff Perrin's user avatar
2 votes
0 answers
533 views

plot h3 hexagons with folium

I´m trying to plot some h3 hexagons with folium using .explore Here is my code: B['h3_code'] = B.apply(lambda row: h3.geo_to_h3(row['latitude_Destino'], row['longitude_Destino'], 8), axis=1) desthex =...
FG85's user avatar
  • 63
0 votes
1 answer
108 views

Convert Shapefile to H3 - R

I have a gpkg file which contains some buildings and am looking to convert this to H3 size 11. BUILDINGS <- st_read(GPKG, layer = "buildings") Basically anywhere one of these buildings ...
Aaron Walton's user avatar
0 votes
1 answer
1k views

get centroid latitude and longitude of h3 hexagon

I know ho to get h3 hexagon ids for various resolutions and add them to a pandas dataframe containing latitudes and longitudes. Is it possible to get the centroid latitude and longitude of each h3 ...
cs0815's user avatar
  • 16.9k
0 votes
1 answer
129 views

Scala multipolygon to h3

I'm following this tutorial https://www.databricks.com/notebooks/geomesa-h3-notebook.html and have encountered a problem. Namely the multiPolygonToH3 function fills only the first polygon. This is my ...
gjin's user avatar
  • 889
0 votes
1 answer
307 views

how to use vectorized H3 functions from h3-py?

import numpy as np lats = np.random.uniform(0, 90, 1_000_000) lons = np.random.uniform(0, 90, 1_000_000) import h3 import h3.api.numpy_int Passing numpy arrays straight away: fails with: ...
Georg Heiler's user avatar
0 votes
2 answers
555 views

How to parallelize a pandas UDF in polars (h3 polyfill) for string typed UDF outputs?

I want to execute the following lines of python code in Polars as a UDF: w = wkt.loads('POLYGON((-160.043334960938 70.6363054807905, -160.037841796875 70.6363054807905, -160.037841796875 70....
Georg Heiler's user avatar
0 votes
0 answers
249 views

Adding a Before/After Slider to a Leaflet Map in R

I am presently reading though Uber's H3 documentation and am wondering if its possible to add a before/after slider to a leaflet map created in R. For visual reference,I am looking to figure out how ...
Bensstats's user avatar
  • 990
0 votes
0 answers
77 views

installing uber H3 library in google script [duplicate]

is there someone that could help me in installing uber h3 library in google script? I'm trying to implement a function that transform a couple of coordinate into an H3_9 geometry, I'm able to do it in ...
michele's user avatar
0 votes
2 answers
376 views

H3 - How to get center lat long of a multi polygon?

I have created Multi polygons using h3SetToMultiPolygon from the list of H3 cell ids as shown below: Now I want to get the center (I know it's not a perfect shape to get the center, but a rough one ...
Premshankar Tiwari's user avatar
1 vote
1 answer
226 views

How do I format the geojson data so that it is accepted by Mapbox

I have a geoJson of hex indexes, which I am trying to render on to mapbox. Here is my code (ignore the indentation): export default class App extends Component { constructor() { super(); ...
mohsan123's user avatar
  • 101
1 vote
0 answers
225 views

How to populate world map with hexagons Mapbox

I want to make an interactive app where users can view crime rates in their area by pulling in geo-data from the met police website. I want to display hexagons across the map (either through using H3 ...
mohsan123's user avatar
  • 101
0 votes
2 answers
632 views

How would I draw hexagonal grid using H3 in Javascript?

I want to make a system where a user will be able to draw a hexagonal grid. The regions and their coordinates will be stored in Database. We are thinking to implement H3 libary for this. How will be ...
Haider Wain's user avatar
0 votes
1 answer
254 views

Use the H3 cell index to create a bounding box and perform a point in bbox operation

With latitude and longitude, there is the possbility to create a bounding box based on xmax/ymax and xmin/ymin. Having coordinates, I can perform a range search to check, if these coordinates are ...
four-eyes's user avatar
  • 11.1k
0 votes
1 answer
370 views

Uber H3 Hex - Search database of res 10 indexes for their res 4-9 parents

I have a large database of location points and their corresponding res 10 hexes. I need to query this database and identify how many points are in a certain res 4, 5, 6, 7, 8, and 9 hex. Is this ...
Aidan Curry's user avatar
0 votes
1 answer
241 views

h3.polyfill misses indices for Antarctica geojson

Could you please help me understand the issue with H3 geospatial indexing? import h3 geo_antarctic = {"type":"Polygon","coordinates":[[[-170.63764683701507,-85....
Arty's user avatar
  • 15
0 votes
1 answer
115 views

apply h3.string_to_h3 on dask.dataframe thru map_partitions

I would like to ask how to use dd.map_partitions for h3.string_to_h3 function. my dataframe looks like this h3 lat lon x y elevation 2 8ca80c8e91015ff -23.068134 -52.042272 393235.906794 7.448557e+...
Franke Hsu's user avatar
0 votes
1 answer
404 views

The Theory Behind H3 index system

I am getting to understand the theory behind H3 index system. I've been reading several papers on the topic of discrete global grid system, however, it seems to me there's nothing specifically about ...
hoangnguyen7699's user avatar
0 votes
1 answer
760 views

H3 polyfill for country-scale polygons

I am trying to generate a grid for a given (multi) polygon. I understand a grid as a collection of h3 indices within a (multi)polygon boundary. Here is the code that I implemented so far: def ...
user1877600's user avatar
0 votes
2 answers
260 views

Convert H3Index to IJK Coordinate?

Is it possible to convert from: "H3Index Representation" https://h3geo.org/docs/core-library/h3Indexing to: "IJK Coordinates" https://h3geo.org/docs/core-library/coordsystems ? ...
oOo's user avatar
  • 261
1 vote
1 answer
235 views

How to install h3-py (from uber) with mamba?

I have recently switched to mamba as a package installer and am now trying to install h3-py into an environment. I have tried several ways, first using: mamba install h3-py but then it says ...
jchristiaanse's user avatar
-1 votes
1 answer
1k views

H3 polyfill is skipping the areas near the boundary I am trying to polyfill. (Python)

Is there a way to polyfill edge to edge or as much as possible (Res 8) without increasing the resolution. Black boundary is the polygon boundary I am trying to polyfill completely
kleo188's user avatar
0 votes
1 answer
1k views

H3 - Show hexagons all over India

I am trying to show the hexagons all over the world, (at least all over India) using H3 on my Leaflet map. I have tried the below logic but it doesn't work: Logic: const boundingBoxIndia = [ [38....
Premshankar Tiwari's user avatar
1 vote
1 answer
754 views

Using H3 to calculate travel times, but where would you get the route?

I am playing around with some location data and came across the Uber H3 library along with this paper on their travel time calculation methodology. There is one thing I can't seem to find an answer ...
joethemow's user avatar
  • 1,685
0 votes
1 answer
447 views

Overlapping polygons with hexagons

I have been struggling with polygons in python 3 for a long time. There is a geojson with a list of polygons and multipolygons. It is necessary to cover these polygons with hexes of a CERTAIN level. ...
Dmitry Polyanskiy's user avatar