line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package GIS::Distance::MathTrig; |
2
|
1
|
|
|
1
|
|
18
|
use 5.008001; |
|
1
|
|
|
|
|
4
|
|
3
|
1
|
|
|
1
|
|
7
|
use strictures 2; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
35
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.19'; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
183
|
use parent 'GIS::Distance::Formula'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
57
|
use Math::Trig qw( great_circle_distance deg2rad ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
47
|
|
9
|
1
|
|
|
1
|
|
5
|
use GIS::Distance::Constants qw( :all ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
104
|
|
10
|
1
|
|
|
1
|
|
8
|
use namespace::clean; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub _distance { |
13
|
5
|
|
|
5
|
|
12
|
my ($lat1, $lon1, $lat2, $lon2) = @_; |
14
|
|
|
|
|
|
|
|
15
|
5
|
|
|
|
|
14
|
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__ |