line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Encoding and name #_{ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=encoding utf8 |
4
|
|
|
|
|
|
|
=head1 NAME |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
Geo::OSM::Render::Projection::CH_LV03 - Project OSM latitudes and longitudes (preferrably within the area of Switzerland) into LV03 (»Landesvermessung 03«) x, y coordinate pairs to be rendered by L. |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=cut |
9
|
|
|
|
|
|
|
package Geo::OSM::Render::Projection::CH_LV03; |
10
|
|
|
|
|
|
|
#_} |
11
|
|
|
|
|
|
|
#_{ use … |
12
|
2
|
|
|
2
|
|
91006
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
432
|
|
13
|
2
|
|
|
2
|
|
17
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
68
|
|
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
2
|
|
541
|
use utf8; |
|
2
|
|
|
|
|
21
|
|
|
2
|
|
|
|
|
13
|
|
16
|
2
|
|
|
2
|
|
85
|
use Carp; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
162
|
|
17
|
2
|
|
|
2
|
|
462
|
use Geo::OSM::Render::Projection; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
78
|
|
18
|
2
|
|
|
2
|
|
1971
|
use Geo::Coordinates::Converter::LV03 qw(lat_lng_2_y_x); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
our @ISA = qw(Geo::OSM::Render::Projection); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
#_} |
22
|
|
|
|
|
|
|
our $VERSION = 0.01; |
23
|
|
|
|
|
|
|
#_{ Synopsis |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 SYNOPSIS |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
This class derives from L<> and uses |
28
|
|
|
|
|
|
|
L<< Geo::Coordinates::Converter::LV03 >> for the conversion. |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=cut |
31
|
|
|
|
|
|
|
#_} |
32
|
|
|
|
|
|
|
#_{ Overview |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 OVERVIEW |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
See L. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=cut |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
#_} |
41
|
|
|
|
|
|
|
#_{ Methods |
42
|
|
|
|
|
|
|
#_{ POD |
43
|
|
|
|
|
|
|
=head1 METHODS |
44
|
|
|
|
|
|
|
=cut |
45
|
|
|
|
|
|
|
#_} |
46
|
|
|
|
|
|
|
sub new { #_{ |
47
|
|
|
|
|
|
|
#_{ POD |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 new |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my $proj = Geo::OSM::Render::Projection::CH_LV03->new(); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=cut |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
#_} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
my $class = shift; |
59
|
|
|
|
|
|
|
my $self = $class->SUPER::new(); |
60
|
|
|
|
|
|
|
return $self; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
} #_} |
63
|
|
|
|
|
|
|
sub lat_lon_to_x_y { #_{ |
64
|
|
|
|
|
|
|
#_{ POD |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 lat_lon_to_x_y |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
my ($x, $y) = $projection->lat_lon_to_x_y($lat, $lon); |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=cut |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
#_} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
my $self = shift; |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
return lat_lng_2_y_x(@_); |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
} #_} |
79
|
|
|
|
|
|
|
#_} |
80
|
|
|
|
|
|
|
#_{ POD: Author |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 AUTHOR |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
René Nyffenegger |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=cut |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
#_} |
89
|
|
|
|
|
|
|
#_{ POD: Copyright and License |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
92
|
|
|
|
|
|
|
Copyright © 2017 René Nyffenegger, Switzerland. All rights reserved. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
95
|
|
|
|
|
|
|
under the terms of the the Artistic License (2.0). You may obtain a |
96
|
|
|
|
|
|
|
copy of the full license at: L |
97
|
|
|
|
|
|
|
=cut |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
#_} |
100
|
|
|
|
|
|
|
#_{ POD: Source Code |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 Source Code |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
The source code is on L<< github|https://github.com/ReneNyffenegger/perl-Geo-OSM-Render >>. Meaningful pull requests are welcome. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=cut |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
#_} |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
'tq84'; |