line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geo::Coordinates::Converter::Point; |
2
|
8
|
|
|
8
|
|
104632
|
use strict; |
|
8
|
|
|
|
|
18
|
|
|
8
|
|
|
|
|
273
|
|
3
|
8
|
|
|
8
|
|
42
|
use warnings; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
310
|
|
4
|
|
|
|
|
|
|
use Class::Accessor::Lite ( |
5
|
8
|
|
|
|
|
88
|
rw => [qw/ lat lng datum format height /], |
6
|
8
|
|
|
8
|
|
2077
|
); |
|
8
|
|
|
|
|
2480
|
|
7
|
|
|
|
|
|
|
|
8
|
8
|
|
|
8
|
|
1989
|
use Geo::Coordinates::Converter; |
|
8
|
|
|
|
|
14
|
|
|
8
|
|
|
|
|
1264
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# back compatibility |
11
|
|
|
|
|
|
|
sub mk_accessors { |
12
|
0
|
|
|
0
|
0
|
0
|
my($class, @args) = @_; |
13
|
0
|
|
|
|
|
0
|
Class::Accessor::Lite->mk_accessors(@_); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
sub mk_ro_accessors { |
16
|
0
|
|
|
0
|
0
|
0
|
my($class, @args) = @_; |
17
|
0
|
|
|
|
|
0
|
Class::Accessor::Lite->mk_ro_accessors(@_); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
sub mk_wo_accessors { |
20
|
0
|
|
|
0
|
0
|
0
|
my($class, @args) = @_; |
21
|
0
|
|
|
|
|
0
|
Class::Accessor::Lite->mk_wo_accessors(@_); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
8
|
|
|
8
|
|
9259
|
use Storable (); |
|
8
|
|
|
|
|
44025
|
|
|
8
|
|
|
|
|
2079
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
*latitude = \⪫ |
27
|
|
|
|
|
|
|
*longitude = \&lng; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub new { |
30
|
70
|
|
|
70
|
1
|
40292
|
my($class, $args) = @_; |
31
|
70
|
50
|
|
|
|
243
|
$args = +{} unless defined $args; |
32
|
70
|
|
|
|
|
123
|
my $self = bless { %{ $args } }, $class; |
|
70
|
|
|
|
|
2700
|
|
33
|
70
|
|
100
|
|
|
419
|
$self->{lat} ||= $self->{latitude} || '0.000000'; |
|
|
|
66
|
|
|
|
|
34
|
70
|
|
100
|
|
|
322
|
$self->{lng} ||= $self->{longitude} || '0.000000'; |
|
|
|
66
|
|
|
|
|
35
|
70
|
|
100
|
|
|
402
|
$self->{height} ||= 0; |
36
|
70
|
|
100
|
|
|
323
|
$self->{datum} ||= 'wgs84'; |
37
|
70
|
|
|
|
|
300
|
$self; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub clone { |
41
|
104
|
|
|
104
|
1
|
4708
|
my $self = shift; |
42
|
104
|
|
|
|
|
8599
|
my $clone = Storable::dclone($self); |
43
|
104
|
|
|
|
|
531
|
$clone; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub converter { |
47
|
1
|
|
|
1
|
1
|
7
|
my $self = shift; |
48
|
1
|
|
|
|
|
11
|
Geo::Coordinates::Converter->new( |
49
|
|
|
|
|
|
|
point => $self, |
50
|
|
|
|
|
|
|
)->convert( @_ ); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__ |