Render/Projection/CH_LV03.pm

filter: Statementstmt 88.8% 16 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 91.6% 22 / 24 CC 1 SCAR 0.5
CC
1
Cov
89%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Render/Viewport.pm ↑ Summary Render/Projection/Ident.pm »
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<Geo::OSM::Render>.
7  
8 =cut
9 package Geo::OSM::Render::Projection::CH_LV03;
10 #_}
11 #_{ use …
12 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 2 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 2 ▶use Geo::OSM::Render::Projection;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 0 ▶use Geo::Coordinates::Converter::LV03 qw(lat_lng_2_y_x);
Subroutine BEGIN: called CC=1 SCAR=2.6
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<<Geo::OSM::Render::Projection>> 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<Geo::OSM::Render::Projection/OVERVIEW>.
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 <rene.nyffenegger at adp-gmbh.ch>
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<http://www.perlfoundation.org/artistic_license_2_0>
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';
« Render/Viewport.pm ↑ Summary Render/Projection/Ident.pm »