line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geo::Coordinates::UTM::XS; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
24113
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
26
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
6
|
use Carp; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
133
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
BEGIN { |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
2
|
our $VERSION = '0.04'; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
|
|
6
|
require XSLoader; |
13
|
1
|
|
|
|
|
899
|
XSLoader::load('Geo::Coordinates::UTM::XS', $VERSION); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
require Exporter; |
18
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
19
|
|
|
|
|
|
|
our @EXPORT = qw( latlon_to_utm latlon_to_utm_force_zone utm_to_latlon |
20
|
|
|
|
|
|
|
ellipsoid_info ellipsoid_names); |
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
1
|
|
1137
|
use Geo::Coordinates::UTM; |
|
1
|
|
|
|
|
37705
|
|
|
1
|
|
|
|
|
120
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
BEGIN { |
25
|
1
|
|
|
1
|
|
185
|
*_cleanup_name = \&Geo::Coordinates::UTM::_cleanup_name; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
our %_ellipsoid; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
my $i = 1; |
31
|
|
|
|
|
|
|
for (ellipsoid_names) { |
32
|
|
|
|
|
|
|
$_ellipsoid{$_} = $i; |
33
|
|
|
|
|
|
|
$_ellipsoid{_cleanup_name($_)} = $i; |
34
|
|
|
|
|
|
|
# print "ellipsoid info $_: ", join(', ', ellipsoid_info($_)), "\n"; |
35
|
|
|
|
|
|
|
_set_ellipsoid_info($i, (ellipsoid_info($_))[1,2]); |
36
|
|
|
|
|
|
|
$i++; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub _ellipsoid_index { |
40
|
0
|
|
|
0
|
|
|
my $name = shift; |
41
|
0
|
0
|
|
|
|
|
my $index = $_ellipsoid{_cleanup_name($name)} |
42
|
|
|
|
|
|
|
or croak "bad ellipsoid name '$name'"; |
43
|
0
|
|
|
|
|
|
$_ellipsoid{$name} = $index; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
{ |
47
|
1
|
|
|
1
|
|
13
|
no warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
114
|
|
48
|
|
|
|
|
|
|
*latlon_to_utm = \&_latlon_to_utm; |
49
|
|
|
|
|
|
|
*latlon_to_utm_force_zone = \&_latlon_to_utm_force_zone; |
50
|
|
|
|
|
|
|
*utm_to_latlon = \&_utm_to_latlon; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
__END__ |