NAME
GIS::Distance - Calculate geographic distances.
SYNOPSIS
use GIS::Distance;
my $calc = GIS::Distance->new();
my $distance = $calc->distance( $lon1,$lat1 => $lon2,$lat2 );
DESCRIPTION
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.
METHODS
new
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.
distance
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.
AUTHOR
Aran Clary Deltac <bluefeet@cpan.org>
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.