line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geo::Coordinates::Converter::Format::Milliseconds; |
2
|
6
|
|
|
6
|
|
5833
|
use strict; |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
266
|
|
3
|
6
|
|
|
6
|
|
38
|
use warnings; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
231
|
|
4
|
6
|
|
|
6
|
|
122
|
use parent 'Geo::Coordinates::Converter::Format'; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
52
|
|
5
|
|
|
|
|
|
|
|
6
|
6
|
|
|
6
|
|
561
|
use POSIX; |
|
6
|
|
|
|
|
23
|
|
|
6
|
|
|
|
|
42
|
|
7
|
|
|
|
|
|
|
|
8
|
69
|
|
|
69
|
0
|
282
|
sub name { 'milliseconds' } |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub detect { |
11
|
34
|
|
|
34
|
0
|
78
|
my($self, $point) = @_; |
12
|
|
|
|
|
|
|
|
13
|
34
|
100
|
66
|
|
|
133
|
return unless defined $point->lat && -324_000_000 < $point->lat && $point->lat < 324_000_000 && $point->lat =~ /^-?[0-9]+$/; |
|
|
|
66
|
|
|
|
|
|
|
|
66
|
|
|
|
|
14
|
1
|
50
|
33
|
|
|
35
|
return unless defined $point->lng && -648_000_000 < $point->lng && $point->lng < 648_000_000 && $point->lng =~ /^-?[0-9]+$/; |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
|
|
41
|
return $self->name; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub to { |
20
|
1
|
|
|
1
|
0
|
4
|
my($self, $point) = @_; |
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
|
|
5
|
$point->lat($point->lat / 360_0000); |
23
|
1
|
|
|
|
|
16
|
$point->lng($point->lng / 360_0000); |
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
|
|
12
|
$point; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub from { |
29
|
1
|
|
|
1
|
0
|
3
|
my($self, $point) = @_; |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
|
|
5
|
$point->lat($self->round($point->lat * 360_0000)); |
32
|
1
|
|
|
|
|
10
|
$point->lng($self->round($point->lng * 360_0000)); |
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
|
|
8
|
$point; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub round { |
38
|
4
|
|
|
4
|
0
|
36
|
my($self, $val) = @_; |
39
|
4
|
|
|
|
|
27
|
ceil($val); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|