GIS::Distance - Calculate geographic distances.
use GIS::Distance; my $calc = GIS::Distance->new(); my $distance = $calc->distance( $lon1,$lat1 => $lon2,$lat2 );
This perl library aims to provide as many tools to make it as simple as possible to calculate distances between geographic points, and anything that can be derived from that.
Please note that this is alpha software. This module will become the replacement for Geo::Distance. So, until this module is well tested and production worthy I would recommend using that.
my $calc = GIS::Distance->new();
Returns a blessed GIS::Distance::Haversine object by default. If you want to use a different formula, such as the GIS::Distance::Vincenty, then call new() on that class.
my $distance = $calc->distance( $lon1,$lat1 => $lon2,$lat2 );
Calculates the distance between two lon/lat points in decimal degree format. In return you will receive an Class::Measure::Length object.
GID::Distance::Cosine
GID::Distance::GeoEllipsoid
GID::Distance::GreatCircle
GID::Distance::Haversine
GID::Distance::MathTrig
GID::Distance::Polar
GID::Distance::Vincenty
Create a GIS::Coord class that represents a geographic coordinate. Then modify this module to accept input as either lon/lat pairs, or as GIS::Coord objects.
Create an extension to DBIx::Class with the same goal as Geo::Distance's closest() method.
The graphs produce by graph_deviations.pl script show that the GIS::Distance::GreatCircle formula is not performing well at all. In most cases it is either returning a distance of 0 or a distance of 20,000 km.
Aran Clary Deltac <bluefeet@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install GIS::Distance, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GIS::Distance
CPAN shell
perl -MCPAN -e shell install GIS::Distance
For more information on module installation, please visit the detailed CPAN module installation guide.