GIS::D...athTrig(3pm)

πŸ“¦
version 0.20 Β· 6 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– GIS::Distance::MathTrig β€” the perl one 🫢

okay so bestie, we're looking at GIS::Distance::MathTrig(3pm) from the User Contributed Perl Documentation collection, and honestly? it's giving ✨ trigonometry but make it cute ✨. it's the manpage for the MathTrig formula class in the GIS::Distance family. let's get into it πŸ’…


✨ NAME ✨

GIS::Distance::MathTrig β€” great circle distance calculations using Math::Trig. 🌍

(no cap, it does exactly what it says on the tin, we love a self-aware module)


🌸 DESCRIPTION 🌸

so this formula uses Math::Trig's great_circle_distance() function, right? and at this time β€” like, currently, as of this writing β€” that function uses math that's almost exactly the same formula as the GIS::Distance::Cosine formula. 😭 they're basically twins.

and here's the tea: the Cosine formula is about 5% faster than this formula. πŸ’€ so if you're picking between them... that's a thing you now know. iykyk.

normally, bestie, you do not use this module directly. πŸ™ˆ instead you use GIS::Distance, which in turn interfaces with the various formula classes for you. it's the main character, this is the supporting cast. πŸ‘‘


🧚 FORMULA 🧚

here's the math, verbatim, no notes:

lat0 = 90 degrees - phi0
lat1 = 90 degrees - phi1
d = R * arccos(cos(lat0) * cos(lat1) * cos(lon1 - lon01) + sin(lat0) * sin(lat1))

as stated in the Math::Trig documentation. πŸ“š slay.


🫢 SUPPORT 🫢

see "SUPPORT" in GIS::Distance. that's where the help lives, go look there πŸ’–


πŸ‘‘ AUTHORS πŸ‘‘

see "AUTHORS" in GIS::Distance. the legends are credited over there ✨


πŸŽ€ LICENSE πŸŽ€

see "LICENSE" in GIS::Distance. legal stuff, very demure, very mindful 🌸


and that's the whole page, bestie!! it shipped with perl v5.36.0 and the date on it is 2023-10-21 β€” so it's got a lil vintage moment going on. anyway, go calculate some great circle distances, you absolute icon πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from