Git Product home page Git Product logo

Comments (4)

placz avatar placz commented on May 3, 2024

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)

from s2-geometry-library-java.

datamacgyver avatar datamacgyver commented on May 3, 2024

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

  • S2 assumes the earth is a perfect sphere
  • The surface area of a sphere is given by 4*pi*radius.
  • If we assume radius is 1 ("a unit") then the surface area of a sphere is simply 4*pi, or 12.5664...
  • Note that 12.5664 / 6 (the six sides of the cube!) = 2.0944... which is the number you have
  • As we've not got a unit for our radius of one, our number also has no unit so in answer to your explicit question: There isn't one!

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

  • I know that the total area of one cube face given by S2's authors is 85,011,012.19 km^2
  • If 2.0944... = 85,011,012.19 then 1 = 40,589,768.4219... km
  • Therefore, to convert to km^2 I multiply an S2 area by 40,589,768.4219...
  • I have not validated the accuracy of this compared to a projection of a polygon but it's in the ballpark based on me drawing squares over the middle east. It'll never be perfect as the Earth is pretty far from a perfect sphere!

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!

from s2-geometry-library-java.

eengle avatar eengle commented on May 3, 2024

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.

from s2-geometry-library-java.

eengle avatar eengle commented on May 3, 2024

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

from s2-geometry-library-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.