google / s2-geometry-library-java

Automatically exported from code.google.com/p/s2-geometry-library-java
Apache License 2.0
533 stars 230 forks source link

What's the unit of area being calculated in S2Cell class? #9

Closed chhabraamit closed 3 years ago

chhabraamit commented 6 years ago

Level 0's average area is 2.0943951023931953 and 4 times of it is supposed to cover the entire Earth's area.

placz commented 6 years ago

It's measuring the surface area on a unit sphere covered by the cell. 6 times a level 0's average area is 4 * pi. (6 sides on a cube, not 4)

datamacgyver commented 4 years ago

To add context here (because I got here and scratched my head for a bit):

Now, your implicit question of how we obtain something that we can interpret more easily:

Please correct me if I'm wrong, this makes sense in my head. Oh, and I've been liberal on the rounding here! Your mileage will vary but I'd advise working the above out to a precision that fits your use case!

eengle commented 3 years ago

The unit of measure, when the sphere is radius 1, is called a "steradian", basically the spherical equivalent of the 2D radian. It has the nice property that a number 10% the size of the whole 4*pi value is in fact 10% of the land area, so it's linear with the size of the surface being covered.

eengle commented 3 years ago

I'm closing this but feel free to reopen if there are any other questions about this.