Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2D Projection? #102

Closed
notflip opened this issue Nov 22, 2020 · 1 comment
Closed

2D Projection? #102

notflip opened this issue Nov 22, 2020 · 1 comment

Comments

@notflip
Copy link

notflip commented Nov 22, 2020

This lib is working fine but there's a (to be expected) distortion, is there a simple way to represent the hexagons in a flat 2D way?

@nrabinowitz
Copy link
Collaborator

That's an interesting question, and it depends on your use case. The underlying representation of the grid does not have distortion, but this grid is projected (via inverse gnomonic projection, see some explanation here) to get the lat/long coords for each cell. This creates the distortion you describe. However, you can reverse the transformation when rendering with a gnomonic projection, as demonstrated here: https://observablehq.com/@nrabinowitz/flat-h3-grid-via-gnomonic-projection

This only works if you have control over the projection of your map, of course, and only when all the cells you want to render are on the same icosahedron face.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants