GIS::D...Circle(3pm)
β¨ GIS::Distance::GreatCircle β¨
okay bestie, welcome to the GIS::Distance::GreatCircle page from the Perl docs (manual section 3pm) π this is the one that does great circle distance calculations, and it is lowkey iconic for reasons we're about to get into.
π NAME π
GIS::Distance::GreatCircle β great circle distance calculations. that's it, that's the whole vibe π
πΈ DESCRIPTION πΈ
So like, this is a true Great Circle Distance calculation. fr fr. not the fake one.
The tea is: this module got created because GIS::Distance::MathTrig uses Math::Trig's great_circle_distance() β and that thing doesn't actually appear to use the actual Great Circle Distance formula π (it's more likely Cosine, ngl). so we made our own. main character move honestly.
There's also a faster (XS) version of this formula if you want that speed, and it lives at GIS::Distance::Fast::GreatCircle π₯
Also important: normally you do not use this module directly. instead you use GIS::Distance, which in turn interfaces with the various formula classes. she's the manager, this module is the talent β¨
π¦ FORMULA π¦
here's the math, and yes she ate:
c = 2 * asin( sqrt(
( sin(( lat1 - lat2 )/2) )**2 +
cos( lat1 ) * cos( lat2 ) *
( sin(( lon1 - lon2 )/2) )**2
) )
π SUPPORT π
See "SUPPORT" in GIS::Distance.
π AUTHORS π
See "AUTHORS" in GIS::Distance.
π LICENSE π
See "LICENSE" in GIS::Distance.
no cap, everything above is exactly what the page says β I just made it cute π«Ά
and that's the whole page bestie, periodt π β¨
this was perl v5.36.0, dated 2023-10-21, and it's giving GIS::D...Circle(3pm) energy ππ¦ bye ily, go calculate some distances π
π¦ 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