GIS::D...:Polar(3pm)
โจ GIS::Distance::Polar โจ
okay so bestie, welcome to GIS::Distance::Polar โ she's part of the User Contributed Perl Documentation for the GIS::Distance family, and she does polar coordinate flat-earth distance calculations. ๐ buckle up.
๐ฆ NAME ๐ฆ
GIS::Distance::Polar โ polar coordinate flat-earth distance calculations. that's her. that's the whole name. slay.
๐ธ DESCRIPTION ๐ธ
so supposedly this is a formula to better calculate distances at the poles. like, that's the pitch. allegedly. ๐
but here's the tea, and I need you to hear me on this: while it is implemented, this formula has not been tested much. if you use it, PLEASE share your results with the author. literally begging. ๐ฅบ
and ngl, it's looking rough. the author tested this formula's results versus GIS::Distance::Vincenty, and it appears that this formula is broken (or the implementation is) โ you can see the whole thing play out in t/polar.t. ๐ no cap.
also, a faster (XS) version of this formula is available as GIS::Distance::Fast::Polar. so like, if speed is your main character moment, that's your girl.
and fyi: normally this module is not used directly. instead GIS::Distance is used, which in turn interfaces with the various formula classes. so you're probably supposed to go through the front door, not the window. ๐ชโจ
๐งฎ FORMULA ๐งฎ
here's the math, bestie. verbatim, because numbers do not play:
a = pi/2 - lat1
b = pi/2 - lat2
c = sqrt( a^2 + b^2 - 2 * a * b * cos(lon2 - lon1) )
d = R * c
๐ซถ SUPPORT ๐ซถ
See "SUPPORT" in GIS::Distance. they got you. ๐
๐ AUTHORS ๐
See "AUTHORS" in GIS::Distance. credit where credit is due, periodt.
๐ LICENSE ๐
See "LICENSE" in GIS::Distance. read it, love it, respect it. ๐
and that's the whole page, babe. this little doc shipped with perl v5.36.0 and is dated 2023-10-21 โ so if you're reading this in the future, just know she's a vintage icon. ๐ mwah, go calculate some distances (carefully, apparently). โจ๐
๐ฆ where this page comes from
- debian trixie: libgis-distance-perl 0.20-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libgis-distance-perl 0.20-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgis-distance-perl 0.20-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgis-distance-perl 0.20-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms