Geo::Inverse

Geo::Inverse is a Perl module to calculate geographic distance from a lat & lon pair.
Download

Geo::Inverse Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Michael R. Davis
  • Publisher web site:
  • http://search.cpan.org/~mrdvt/Geo-GoogleEarth-Document-0.09/lib/Geo/GoogleEarth/Document/Folder.pm

Geo::Inverse Tags


Geo::Inverse Description

Geo::Inverse is a Perl module to calculate geographic distance from a lat & lon pair. Geo::Inverse is a Perl module to calculate geographic distance from a lat & lon pair.SYNOPSIS use Geo::Inverse; my $obj = Geo::Inverse->new(); # default "WGS84" my ($lat1,$lon1,$lat2,$lon2)=(38.87, -77.05, 38.95, -77.23); my ($faz, $baz, $dist)=$obj->inverse($lat1,$lon1,$lat2,$lon2); #array context my $dist=$obj->inverse($lat1,$lon1,$lat2,$lon2); #scalar context print "Input Lat: $lat1 Lon: $lon1n"; print "Input Lat: $lat2 Lon: $lon2n"; print "Output Distance: $distn"; print "Output Forward Azimuth: $fazn"; print "Output Back Azimuth: $bazn";This module is a pure Perl port of the NGS program in the public domain "inverse" by Robert (Sid) Safford and Stephen J. Frakes.CONSTRUCTORnewThe new() constructor may be called with any parameter that is appropriate to the ellipsoid method which establishes the ellipsoid. my $obj = Geo::Inverse->new(); # default "WGS84"METHODSellipsoidMethod to set or retrieve the current ellipsoid object. The ellipsoid is a Geo::Ellipsoids object. my $ellipsoid=$obj->ellipsoid; #Default is WGS84 $obj->ellipsoid('Clarke 1866'); #Built in ellipsoids from Geo::Ellipsoids $obj->ellipsoid({a=>1}); #Custom Sphere 1 unit radiusinverseThis method is the user frontend to the mathematics. This interface will not change in future versions. my ($faz, $baz, $dist)=$obj->inverse($lat1,$lon1,$lat2,$lon2); Requirements: · Perl


Geo::Inverse Related Software