dggridR | Discrete Global Grids for R : Spatial Analysis Done Right | Map library
kandi X-RAY | dggridR Summary
kandi X-RAY | dggridR Summary
You want to do spatial statistics, and it’s going to involve binning. Binning with a rectangular grid introduces messy distortions. At the macro-scale using a rectangular grid does things like making Greenland bigger than the United States and Antarctica the largest continent. But this kind of distortion is present no matter what the resolution is; in fact, it shows up whenever you project a sphere onto a plane. What you want are bins of equal size, regardless of where they are on the globe, regardless of their resolution. dggridR solves this problem. dggridR builds discrete global grids which partition the surface of the Earth into hexagonal, triangular, or diamond cells, all of which have the same size. (There are some minor caveats which are detailed in the vignettes.). ![Discrete Global Grid in use] vignettes/dggrid.png). (Naturally, you can use much smaller cells than those shown in the image above.). This package includes everything you need to make spatial binning great again. Many details and examples are included in the vignette.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of dggridR
dggridR Key Features
dggridR Examples and Code Snippets
Community Discussions
Trending Discussions on dggridR
QUESTION
When looking at the wiki for the game "Songs of the Eons" under development, I see the claim that the number of tiles on the planet generated could be calculated by
30*s²+2
in which s
is the planet size.
They also say that the planet is constructed by almost all hexagons and only 12 pentagons.
I know a bit about the sub-divison techniques (like the root-3 subdivision), but I am completely lost on this.
I have looked through this, or this, but I didn't notice one that gives the answer. Perhaps the closest one would be this, but it is still different in tile numbers.
Someone knows how this is done? Some papers or source codes would be great.
...ANSWER
Answered 2020-Mar-12 at 11:02One of the comments to the top answer in your second link mentions how this is done: The sphere is created by subdividing the triangular faces of an icosahedron. The resulting triangles can be grouped into hexagons. Some of the hexagons will cross the edges. The triangles at the tips of the original faces can only be grouped into pentagons.
The base construction (s = 1) will give you the canonical football tesselation. With increasing size, you get:
For each of the 12 vertices of the icosahedron, you get one pentagon. Forr each of the 30 edges of the icosahedron, you get (s − 1) hexagons. With each increase of s by 1, the number of full hexagons (in white) increases by 3·(s − 1). For s = 1, you just have one full hexagon. So for each of the 20 faces of the icosahedron, you get:
H = 1 + 3·∑(k = 1 ... s) k
= 1 + 3/2 (s − 1)·s
In total:
T = 30·(s − 1) + 20·(1 + 3/2 (s − 1)·s) + 12
= 30·s − 30 + 20 + 30·(s − 1)·s + 12
= 30·s2 + 2
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install dggridR
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page