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 like:
size = 7
hexagons = pd.DataFrame(h3.polyfill(geoJson, size), columns=['hexagons'])
hexagons.head()
8752e5b80ffffff
8752ee6c1ffffff
Note h3 expects epsg:4326 and later generates the same projection again (https://github.com/uber/h3/issues/121)
Now when moving to https://kepler.gl/ and uploading the data I see three strange things happening
- polygons from the WKT line string are distorted. This would indicate that the wrong projection is used. But trying to convert to the supported https://github.com/keplergl/kepler.gl/blob/6b380ac6db94e10fed0a76f5e78ef7e55406df21/docs/user-guides/b-kepler-gl-workflow/a-add-data-to-the-map.md Webmercator does not fix it
when manually adding a hexagon layer it is rendered in yemen (based on the H3 addr. This seems strange. Could this be a bug in kepler demo?
. This seems really weird as the geometries are generated out of the hexagons using:
h3_to_geo_boundary
hexagon centroids are not filled. Now when converting to hexagon centroids using
h3_to_geo
, and adding the data back in as haHexBin
layer not all the hexagons are filled. But that is strange as originally all hexagons were available (see 1 and 2).
notice how in (3) the hexbin hexagons are projected correctly as hexagons and not distorted.