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
2
votes
1 answer

pandas sum of value for nearest matching neighbors in area

I have two data frames. One is structured like: id,value the second one: id, neighbor_1, neighbor_2, neighbor_3, neighbor_4, neighbor_5, ... Now I want to lookup for each id in the neighborhood data frame for each neighbor the sum of the…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
2
votes
1 answer

Using Deck.GL as Webpack external

I'm currently developing two different React applications which use Deck.GL to render two maps, each with a different type of layer. When using them as standalone they both work perfectly, however, when the two get mounted in the same parent…
Oriol_IL
  • 120
  • 1
  • 14
2
votes
2 answers

H3 hexagons render with swapped lat, long in kepler.gl

I want to plot H3 hexagons. Of Austria. Download and unzip https://biogeo.ucdavis.edu/data/gadm3.6/gpkg/gadm36_AUT_gpkg.zip The full code is available at https://gist.github.com/geoHeil/b5b74887e20e4b659d4bb693a700a402 generates to generate hexagons…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
1
vote
1 answer

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 I had to truncate from h3api.h.in to h3api.h. I…
lurning too koad
  • 2,698
  • 1
  • 17
  • 47
1
vote
1 answer

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 cannot figure out what method to use. I'm using h3…
Geoff Perrin
  • 444
  • 1
  • 6
  • 14
1
vote
0 answers

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
  • 41
  • 4
1
vote
1 answer

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(); const hexagons = ['8928308280fffff',…
mohsan123
  • 91
  • 2
  • 11
1
vote
0 answers

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 Uber library, or an alternative) but essentially…
mohsan123
  • 91
  • 2
  • 11
1
vote
1 answer

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 encountered problems while solving: - nothing provides…
jchristiaanse
  • 103
  • 12
1
vote
2 answers

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 respective center points, or 2 x apothem). I'm…
Chris
  • 4,212
  • 5
  • 37
  • 52
1
vote
2 answers

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 dataframe. This is my not working attempt. data =…
cs0815
  • 16,751
  • 45
  • 136
  • 299
1
vote
0 answers

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 Using cached h3-3.7.3.tar.gz (17.3 MB) Installing…
1
vote
4 answers

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], [102.0, 2.0]]], [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0],…
Dakshin
  • 437
  • 1
  • 6
  • 16
1
vote
1 answer

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 se = [ 180, -90]; const sw = [-180, -90]; let rect…
punkish
  • 13,598
  • 26
  • 66
  • 101
1
vote
1 answer

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? What map do you suggest, and how do I go about…
mohsan123
  • 91
  • 2
  • 11