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
24 The new() constructor
25
26 my $obj = Geo::Constants->new();
27
29 PI
30
31 my $pi = $obj->PI;
32
33 use Geo::Constants qw{PI};
34 my $pi = PI();
35
36 DEG
37
38 my $degrees_per_radian = $obj->DEG;
39
40 use Geo::Constants qw{DEG};
41 my $degrees_per_radian = DEG();
42
43 RAD
44
45 my $radians_per_degree = $obj->RAD;
46
47 use Geo::Constants qw{DEG};
48 my $radians_per_degree = RAD();
49
50 KNOTS
51
52 1 nautical mile per hour = (1852/3600) m/s - United States Department
53 of Commerce, National Institute of Standards and Technology, NIST Spe‐
54 cial Publication 330, 2001 Edition
55
56 Returns 1852/3600
57
59 Add more constants
60
62 Please send to the geo-perl email list.
63
66 Michael R. Davis qw/perl michaelrdavis com/
67
69 Copyright (c) 2006 Michael R. Davis (mrdvt92)
70
71 This library is free software; you can redistribute it and/or modify it
72 under the same terms as Perl itself.
73
75 Geo::Functions Geo::Ellipsoids
76
77
78
79perl v5.8.8 2007-01-15 Geo::Constants(3)