Misaligned polygons, not perfect hexagons. Some pentagons. Catering for projection
See original GitHub issueHi,
Im trying to incorprate your library on a number of solutions which require realtime translations between hex ids and geojson multi/polygons.
h3.h3SetToMultiPolygon(["85291a6ffffffff"],true)
returns
[[[[-121.87310260648961,36.48355301296484],[-121.82059177712684,36.56646154014561],[-121.88144909358076,36.64149027277887],[-121.99481876336013,36.63355254199253],[-122.0471691328904,36.550641568925464],[-121.98631059624982,36.4756707384872],[-121.87310260648961,36.48355301296484]]]]
No problem with that. The issue however is displaying this now results in an askew/misrepresented polygon on a map.
The map is in EPSG:4326. Geojson.io
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"color": "blue"
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
-121.87310260648961,
36.48355301296484
],
[
-121.82059177712684,
36.56646154014561
],
[
-121.88144909358076,
36.64149027277887
],
[
-121.99481876336013,
36.63355254199253
],
[
-122.0471691328904,
36.550641568925464
],
[
-121.98631059624982,
36.4756707384872
],
[
-121.87310260648961,
36.48355301296484
]
]
]
]
}
}
]
}
Is this correct?
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Top Results From Across the Web
H3 oddities / Fil - Observable
In H3, the spherical polygons are not directly defined on the sphere, but are drawn on a gnomonic projection of each face (centered...
Read more >Hexagons are the Bestagons - YouTube
Behind the Scenes: https://www.youtube.com/watch?v=4R3N1oeKbE4‣ Hexagons are the Bestagons shirt: ...
Read more >Love Quote 01 AI Acrylic Art - OpenSea
I saw that you were perfect, and so I loved you. Then I saw that you were not perfect and I loved you...
Read more >Thematic Mapping with Hexagons - Esri
If you end up re-projecting your data, then bear in mind your hexagons will be distorted in terms of their shape and apparent...
Read more >8054$$CH50 - Baen Books
You know perfectly well that I know ALL about him, Mentor. ... It's a small . . . shelf, projection, whatever, no more...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This appears to be working as expected. In order to divide the world into stable cells that have low shape and area distortion, the H3 grid doesn’t work like a screen-based or local hex binning algorithm with screen-aligned hexagons.
Key issues to be aware of:
Amazing! Thank you so much 🙏