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

Is it possible locate hexBinPoints by coordinates (not random position like now)? #68

Open
RedirexStudio opened this issue Dec 28, 2022 · 3 comments

Comments

@RedirexStudio
Copy link

Is it possible locate hexBinPoints by coordinates (not random position like now)?

@vasturiano
Copy link
Owner

@RedirexStudio could you elaborate a bit on your question? It's not overly clear what you mean by random position.

@RedirexStudio
Copy link
Author

@RedirexStudio could you elaborate a bit on your question? It's not overly clear what you mean by random position.

I mean you have hexbin model (https://vasturiano.github.io/three-globe/example/hexbin/), and this model put points around sphere by random like

const N = 6000; const gData = [...Array(N).keys()].map(() => ({ lat: (Math.random() - 0.5) * 180 * 0.9, lng: (Math.random() - 0.5) * 360 / 1 }));

But i want to create model like hexed-polygons (https://vasturiano.github.io/three-globe/example/hexed-polygons/) in borders of countries and use hexbin points like in previous example instead of polygons.

@vasturiano
Copy link
Owner

@RedirexStudio the coordinates of the hex bin points are determined by the H3 system. It varies only by resolution level, otherwise they're located always in the same spot. Determined by a pre-computed hexagonal tesselation of the sphere surface.

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