1Geo::Constants(3) User Contributed Perl Documentation Geo::Constants(3)
2
3
4
6 Geo::Constants - Package for standard Geo:: constants.
7
9 use Geo::Constants qw{PI DEG RAD}; #import into namespace
10 print "PI: ", PI(), "\n";
11 print "d/r: ", DEG(), "\n";
12 print "r/d: ", RAD(), "\n";
13
14 use Geo::Constants; #Perl OO
15 my $obj = Geo::Constants->new();
16 print "PI: ", $obj->PI, "\n";
17 print "d/r: ", $obj->DEG, "\n";
18 print "r/d: ", $obj->RAD, "\n";
19
22 new
23 The new() constructor
24
25 my $obj = Geo::Constants->new();
26
28 PI
29 my $pi = $obj->PI;
30
31 use Geo::Constants qw{PI};
32 my $pi = PI();
33
34 DEG
35 my $degrees_per_radian = $obj->DEG;
36
37 use Geo::Constants qw{DEG};
38 my $degrees_per_radian = DEG();
39
40 RAD
41 my $radians_per_degree = $obj->RAD;
42
43 use Geo::Constants qw{DEG};
44 my $radians_per_degree = RAD();
45
46 KNOTS
47 1 nautical mile per hour = (1852/3600) m/s - United States Department
48 of Commerce, National Institute of Standards and Technology, NIST
49 Special Publication 330, 2001 Edition
50
51 Returns 1852/3600
52
54 Add more constants
55
57 Please send to the geo-perl email list.
58
61 Michael R. Davis qw/perl michaelrdavis com/
62
64 Copyright (c) 2006 Michael R. Davis (mrdvt92)
65
66 This library is free software; you can redistribute it and/or modify it
67 under the same terms as Perl itself.
68
70 Geo::Functions Geo::Ellipsoids
71
72
73
74perl v5.28.0 2007-01-15 Geo::Constants(3)