line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package GIS::Distance::MathTrig; |
2
|
1
|
|
|
1
|
|
73
|
use 5.008001; |
|
1
|
|
|
|
|
4
|
|
3
|
1
|
|
|
1
|
|
5
|
use strictures 2; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
35
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.18'; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
204
|
use parent 'GIS::Distance::Formula'; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
5
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
84
|
use Math::Trig qw( great_circle_distance deg2rad ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
50
|
|
9
|
1
|
|
|
1
|
|
6
|
use GIS::Distance::Constants qw( :all ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
121
|
|
10
|
1
|
|
|
1
|
|
11
|
use namespace::clean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub _distance { |
13
|
5
|
|
|
5
|
|
11
|
my ($lat1, $lon1, $lat2, $lon2) = @_; |
14
|
|
|
|
|
|
|
|
15
|
5
|
|
|
|
|
22
|
return great_circle_distance( |
16
|
|
|
|
|
|
|
deg2rad($lon1), |
17
|
|
|
|
|
|
|
deg2rad(90 - $lat1), |
18
|
|
|
|
|
|
|
deg2rad($lon2), |
19
|
|
|
|
|
|
|
deg2rad(90 - $lat2), |
20
|
|
|
|
|
|
|
$KILOMETER_RHO, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
__END__ |