uber / h3

Hexagonal hierarchical geospatial indexing system
https://h3geo.org
Apache License 2.0
4.85k stars 459 forks source link

Add documentation page highlighting irregularities of the H3 grid #209

Open nrabinowitz opened 5 years ago

nrabinowitz commented 5 years ago

This might help to address frequent questions about:

billyauhk commented 5 years ago

I would suggest adding a h3IsNotHexagon() function as it is not just pentagons.

Another point I want to add (but I don’t think that demand any change in the current H3 system) is a paper which hints that Fuller’s orientation is sub-optimal https://www.researchgate.net/publication/331105808_Optimal_orientations_of_discrete_global_grids_and_the_Poles_of_Inaccessibility

nrabinowitz commented 5 years ago

@billyauhk Per the conversation on #168, the cells in question are topologically hexagons. This is the distinction that matters for most traversal algorithms, directed or undirected edges, etc. The extra distortion vertices only matter when you're treating the cell as a polygon for rendering, area calculation, etc. As the code currently stands, we can't easily offer h3IsNotHexagon in the way that you mean, since the only way to determine this is to actually run it through h3ToGeoBoundary (as opposed to h3IsPentagon, which is a bitwise operation).

billyauhk commented 5 years ago

@nrabinowitz Really thanks for the clarifications and hope these all go into the upcoming documentation updates.

Fil commented 5 years ago

I just made an exploration notebook about this topic https://observablehq.com/@fil/h3-oddities

Comments welcome

sahrk commented 5 years ago

@Fil That is really nice work! I think it's a very clearly written and accurate description. I was a little surprised by the abruptness of the area change at the hexes crossing the icosahedron edges, but it makes sense, they're getting the worst case distortion from both faces.

Fil commented 5 years ago

Thank you Kevin! I have updated the marks I'm using — it should clarify that the red and black colors denote polygons that have extra "distortion vertices", not high distortion per se.

In fact I'm play/working on a DGGS in which I draw a regular lattice of points on a Dymaxion projection, then lift them back to the sphere (& the cells are their Voronoi). Not exactly the system you described in the 1998 paper, but probably quite close.

DahnJ commented 5 years ago

@Fil This is amazing! There should be a link to this in the documentation. I was trying to wrap my head around Uber's oddities for some time now and suddenly virtually everything became clear thanks to your observable. Thank you for making that.