I have used "Girard's Theorem" to calculate the area of spherical polygon with great circle edges, as stated in a previous answer.
In most cases, it works fine, but I encounters a negative area case. The coordinate (lon/lat) of those vertices in counterclockwise are (radian):
5.240747351 1.016447132
5.268216612 1.067869338
5.216315614 1.072132414
5.129855176 1.00109075
5.080803026 0.950935874
5.134615486 0.9460488828
and I plotted the polygon using NCL (Sorry, I couldn't post image right now :()
As you can see, the interior angle 4 is nearly 180 degree (179.77708422692623). The calculated excess is -0.16533548347651544 in degree. Any idea? If you need to see code, I can post them lat开发者_运维技巧er. :)
I have figured it out! The problematic interior angle is not ~179 but ~181, due to the value range of "acos" is [0, PI]. So some judgement should be conducted for each angle (whether the calculated angle is interior or exterior).
精彩评论