Geo::Ellipsoids

Geo::Ellipsoids is a package for standard Geo:: ellipsoid a, b, f and 1/f values.
Download

Geo::Ellipsoids Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jim Gibson
  • Publisher web site:
  • http://search.cpan.org/~jgibson/Geo-Ellipsoid-1.11/lib/Geo/Ellipsoid.pm

Geo::Ellipsoids Tags


Geo::Ellipsoids Description

Geo::Ellipsoids is a package for standard Geo:: ellipsoid a, b, f and 1/f values. Geo::Ellipsoids is a package for standard Geo:: ellipsoid a, b, f and 1/f values.SYNOPSIS use Geo::Ellipsoids; my $obj = Geo::Ellipsoids->new(); $obj->set('WGS84'); #default print "a=", $obj->a, "n"; print "b=", $obj->b, "n"; print "f=", $obj->f, "n"; print "i=", $obj->i, "n"; print "e=", $obj->e, "n"; print "n=", $obj->n(45), "n";CONSTRUCTORnewThe new() constructor may be called with any parameter that is appropriate to the set method. my $obj = Geo::Ellipsoid->new();METHODSsetMethod sets the current ellipsoid. This method is called when the object is constructed (default is WGS84). $obj->set(); #default WGS84 $obj->set('Clarke 1866'); #All built in ellipsoids are stored in meters $obj->set({a=>1, b=>1}); #Custom Sphere 1 unit radiuslistMethod returns a list of known elipsoid names. my @list=$obj->list; my $list=$obj->list; while (@$list) { print "$_n"; }aMethod returns the value of the semi-major axis. my $a=$obj->a;bMethod returns the value of the semi-minor axis. my $b=$obj->b; #b=a(1-f)fMethod returns the value of flatting my $f=$obj->f; #f=(a-b)/aiMethod returns the value of the inverse flatting my $i=$obj->i; #i=1/f=a/(a-b)invfMethod synonym for the i method my $i=$obj->invf; #i=1/feMethod returns the value of the first eccentricity, e. This is the eccentricity of the earth's elliptical cross-section. my $e=$obj->e;e2Method returns the value of eccentricity squared (e.g. e^2). This is not the second eccentricity, e' or e-prime see the "ep" method. my $e=sqrt($obj->e2); #e^2 = f(2-f) = 2f-f^2 = 1-b^2/a^2epMethod returns the value of the second eccentricity, e' or e-prime. The second eccentricity is related to the first eccentricity by the equation: 1=(1-e^2)(1+e'^2). my $ep=$obj->ep;ep2Method returns the square of value of second eccentricity, e' (e-prime). This is more useful in almost all equations. my $ep=sqrt($obj->ep2); #ep2=(ea/b)^2=e2/(1-e2)=a^2/b^2-1nMethod returns the value of n given latitude (degrees). Typically represented by the Greek letter nu, this is the radius of curvature of the ellipsoid perpendicular to the meridian plane. It is also the distance from the point in question to the polar axis, measured perpendicular to the ellipsoid's surface. my $n=$obj->n($lat);Note: Some define a variable n as (a-b)/(a+b) this is not that variable.n_radMethod returns the value of n given latitude (radians). my $n=$obj->n_rad($lat);rhorho is the radius of curvature of the earth in the meridian plane. my $rho=$obj->rho($lat);rho_radrho is the radius of curvature of the earth in the meridian plane. my $rho=$obj->rho_rad($lat);polar_circumferenceMethod returns the value of the semi-minor axis times 2*PI. my $polar_circumference=$obj->polar_circumference;equatorial_circumferenceMethod returns the value of the semi-major axis times 2*PI. my $equatorial_circumference=$obj->equatorial_circumference;shortnameMethod returns the shortname, which is the hash key, of the current ellipsoid my $shortname=$obj->shortname;longnameMethod returns the long name of the current ellipsoid my $longname=$obj->longname;dataMethod returns a hash reference for the ellipsoid definition data structure. my $datastructure=$obj->data;name2refMethod returns a hash reference (e.g. {a=>6378137,i=>298.257223563}) when passed a valid ellipsoid name (e.g. 'WGS84'). my $ref=$obj->name2ref('WGS84')Requirements:· Perl Requirements: · Perl


Geo::Ellipsoids Related Software