Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

# GIS::Distance::Vincenty 0.01001

Date Added: August 24, 2010  |  Visits: 1.063

GIS::Distance::Vincenty Perl module contains Thaddeus Vincenty distance calculations. SYNOPSIS my \$calc = GIS::Distance::Vincenty->new(); my \$distance = \$calc->distance( \$lon1, \$lat1 => \$lon2, \$lat2 ); For the benefit of the terminally obsessive (as well as the genuinely needy), Thaddeus Vincenty devised formulae for calculating geodesic distances between a pair of latitude/longitude points on the earths surface, using an accurate ellipsoidal model of the earth. Vincentys formula is accurate to within 0.5mm, or 0.000015", on the ellipsoid being used. Calculations based on a spherical model, such as the (much simpler) Haversine, are accurate to around 0.3% (which is still good enough for most purposes, of course). Note: the accuracy quoted by Vincenty applies to the theoretical ellipsoid being used, which will differ (to varying degree) from the real earth geoid. If you happen to be located in Colorado, 2km above msl, distances will be 0.03% greater. In the UK, if you measure the distance from Lands End to John O Groats using WGS-84, it will be 28m - 0.003% - greater than using the Airy ellipsoid, which provides a better fit for the UK. NOTE: This formula is still considered alpha quality in GIS::Distance. It has not been tested enough to be used in production. FORMULA a, b = major & minor semiaxes of the ellipsoid f = flattening (a-b)/a L = lon2 - lon1 u1 = atan((1-f) * tan(lat1)) u2 = atan((1-f) * tan(lat2)) sin_u1 = sin(u1) cos_u1 = cos(u1) sin_u2 = sin(u2) cos_u2 = cos(u2) lambda = L lambda_pi = 2PI while abs(lambda-lambda_pi) > 1e-12 sin_lambda = sin(lambda) cos_lambda = cos(lambda) sin_sigma = sqrt((cos_u2 * sin_lambda) * (cos_u2*sin_lambda) + (cos_u1*sin_u2-sin_u1*cos_u2*cos_lambda) * (cos_u1*sin_u2-sin_u1*cos_u2*cos_lambda)) cos_sigma = sin_u1*sin_u2 + cos_u1*cos_u2*cos_lambda sigma = atan2(sin_sigma, cos_sigma) alpha = asin(cos_u1 * cos_u2 * sin_lambda / sin_sigma) cos_sq_alpha = cos(alpha) * cos(alpha) cos2sigma_m = cos_sigma - 2*sin_u1*sin_u2/cos_sq_alpha cc = f/16*cos_sq_alpha*(4+f*(4-3*cos_sq_alpha)) lambda_pi = lambda lambda = L + (1-cc) * f * sin(alpha) * (sigma + cc*sin_sigma*(cos2sigma_m+cc*cos_sigma*(-1+2*cos2sigma_m*cos2sigma_m))) } usq = cos_sq_alpha*(a*a-b*b)/(b*b); aa = 1 + usq/16384*(4096+usq*(-768+usq*(320-175*usq))) bb = usq/1024 * (256+usq*(-128+usq*(74-47*usq))) delta_sigma = bb*sin_sigma*(cos2sigma_m+bb/4*(cos_sigma*(-1+2*cos2sigma_m*cos2sigma_m)- bb/6*cos2sigma_m*(-3+4*sin_sigma*sin_sigma)*(-3+4*cos2sigma_m*cos2sigma_m))) c = b*aa*(sigma-delta_sigma).

 Requirements: No special requirements Platforms: Linux Keyword: Cos,  Gis,  Gisdistancevincenty,  Lambda,  Libraries,  Perl Module,  Programming,  Sigma,  Sin,  Thaddeus Vincenty,  Vincenty Perl Users rating: 0/10

 License: Freeware Size: 8.19 KB
USER REVIEWS
 More Reviews or Write Review
GIS::DISTANCE::VINCENTY RELATED
 Libraries  -  DBD::Informix 2005.02 DBD::Informix is a Perl module witj IBM Informix Database Driver for Perl DBI. SYNOPSIS use DBI; You should also read the documentation for DBI perldoc DBI as this document qualifies what is stated there. Note that this document was last... 276.48 KB Libraries  -  HTML::LoL 1.3 HTML::LoL is a Perl module that can construct HTML from pleasing Perl data structures. SYNOPSIS use HTML::LoL; &hl(sub { print shift }, [body => {bgcolor => white}, [p => Document body, ...], ...]); This module allows you to use Perl... 5.12 KB Libraries  -  Blatte::Compiler 0.9.4 Blatte::Compiler is a Perl module to compile a Blatte document into Perl. SYNOPSIS use Blatte::Compiler; &Blatte::Compiler::compile(\$file_handle, &callback); &Blatte::Compiler::compile_sparse(\$file_handle, &callback); sub callback {... 31.74 KB Libraries  -  HTML Objects 1.2.4 HTML Objects is a Perl module library for turning HTML tags into Perl objects. HTML Objects allows Web pages to be manipulated as a data structure rather than text. Once manipulation is done, the entire page is generated via depth-first... 25.6 KB Libraries  -  Devel::RingBuffer 0.31 Devel::RingBuffer is a Perl module with shared memory ring buffers for Perl scripts diagnosis/debug. SYNOPSIS # # create ringbuffer # use Devel::RingBuffer; use Devel::RingBuffer::TieInt; my \$ringbuf = Devel::RingBuffer->new( File =>... 37.89 KB Libraries  -  FindBin 5.8.8 FindBin is a Perl module that can locate directory of original perl script. SYNOPSIS use FindBin; use lib "\$FindBin::Bin/../lib"; or use FindBin qw(\$Bin); use lib "\$Bin/../lib"; Locates the full path to the script bin directory to... 12.2 MB Libraries  -  Getopt::Tabular 0.3 Getopt::Tabular is a Perl module for table-driven argument parsing for Perl 5. SYNOPSIS use Getopt::Tabular; (or) use Getopt::Tabular qw/GetOptions SetHelp SetHelpOption SetError GetError/; ... ≥topt::Tabular::SetHelp... 25.6 KB Libraries  -  Class::Declare::Attributes 0.04 Class::Declare::Attributes is a Perl module with Class::Declare method types using Perl attributes. SYNOPSIS package My::Class; use 5.006; use strict; use warnings; use base qw( Class::Declare::Attributes ); # declare the... 21.5 KB Libraries  -  List::Comprehensions 0.13 List::Comprehensions is a Perl module that allows for list comprehensions in Perl. SYNOPSIS use List::Comprehensions; use warnings; my @res = (); @res = comp1 { [ @_ ] } [0..4], [0..4], [0..4]; no warnings once; @res = comp2 { [\$i, \$j,... 3.07 KB Libraries  -  Gtk2::Ex::Dialogs 0.11 Gtk2::Ex::Dialogs is a Perl module with useful tools for Gnome2/Gtk2 Perl GUI design. SYNOPSIS use Gtk2::Ex::Dialogs ( destroy_with_parent => TRUE, modal => TRUE, no_separator => FALSE ); # do some stuff like creating your apps main... 20.48 KB