The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Geo::Ellipsoids - Standard perl Geo package for Ellipsoids a and f (and invf) 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";

DESCRIPTION

CONSTRUCTOR

new

The new() constructor may be called with any parameter that is appropriate to the set method.

  my $obj = Geo::Ellipsoid->new();
    

METHODS

list

Method returns a list of known elipsoid names.

a

Method returns the value of the semi-major axis.

f

Method returns the value of flatting

i

Method returns the value of the inverse flatting

invf

Method synonym for the i method

b

Method returns the value of the semi-minor axis.

e2

Method returns the value of eccentricity squared (e.g. e^2)

e

Method returns the value of eccentricity

set

longname

Method returns the long name of the current ellipsoid

shortname

Method returns the shortname, which is the hash key, of the current ellipsoid

data

Method returns a hash reference for the ellipsoid definition data structure.

name2ref

Method returns a hash reference (e.g. {a=>6378137,i=>298.257223563}) when passed a valid ellipsoid name (e.g. 'WGS84').

TODO

BUGS

LIMITS

No guarantees that Perl handles all of the double precision calculations in the same manner as Fortran.

AUTHOR

Michael R. Davis qw/perl michaelrdavis com/

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Geo::Forward Geo::Ellipsoid