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

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

✨ 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