S2Earth::ToAngle(distance) Whether the parameter distance has a range limit? #307
Replies: 2 comments 2 replies
-
No limit, it just converts meters to radians.
I have no reason to believe it's wrong. Do you? |
Beta Was this translation helpful? Give feedback.
1 reply
-
It's steradians. I'll add that to the docs. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://github.com/google/s2geometry/blob/master/src/s2/s2earth.h
62 static constexpr S1Angle ToAngle(const util::units::Meters& distance);
Whether the parameter distance has a range limit?
Another problem:
lng = 0 , lat = 0
through to_s2point(lng, lat, ¢er); get center
radius_meter = 1
through S1Angle radius = S2Earth::ToAngle(util::units::Meters(radius_meter)); get radius
Calculate the area of S2Cap:
new S2Cap(center, radius).GetArea()
the result is 7.7398634578907188e-14 ,Is this correct?
Beta Was this translation helpful? Give feedback.
All reactions