| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# Encoding and name #_{ |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=encoding utf8 |
|
4
|
|
|
|
|
|
|
=head1 NAME |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
Geo::OSM::Primitive::Relation - Abstract base class for the Open Street Map data primitive I. |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=cut |
|
9
|
|
|
|
|
|
|
package Geo::OSM::Primitive::Relation; |
|
10
|
|
|
|
|
|
|
our @ISA = qw(Geo::OSM::Primitive); |
|
11
|
|
|
|
|
|
|
#_} |
|
12
|
|
|
|
|
|
|
#_{ use … |
|
13
|
1
|
|
|
1
|
|
435
|
use warnings; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
38
|
|
|
14
|
1
|
|
|
1
|
|
8
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
33
|
|
|
15
|
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
7
|
use utf8; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
6
|
|
|
17
|
1
|
|
|
1
|
|
33
|
use Carp; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
70
|
|
|
18
|
1
|
|
|
1
|
|
8
|
use Geo::OSM::Primitive; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
203
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
#_} |
|
21
|
|
|
|
|
|
|
our $VERSION = 0.01; |
|
22
|
|
|
|
|
|
|
#_{ Synopsis |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
… |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=cut |
|
29
|
|
|
|
|
|
|
#_} |
|
30
|
|
|
|
|
|
|
#_{ Overview |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 OVERVIEW |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
The idea is to encapsulte methods that use OpenStreetMap data (that is possibly stored in L. |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=cut |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
#_} |
|
39
|
|
|
|
|
|
|
#_{ Methods |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 METHODS |
|
42
|
|
|
|
|
|
|
=cut |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub new { #_{ |
|
45
|
|
|
|
|
|
|
#_{ POD |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 new |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
my $osm_rel = new($osm_relation_id); |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=cut |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
#_} |
|
54
|
|
|
|
|
|
|
|
|
55
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
|
56
|
0
|
|
|
|
|
|
my $id = shift; |
|
57
|
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
my $self = $class->SUPER::new($id, 'rel'); |
|
59
|
|
|
|
|
|
|
|
|
60
|
0
|
0
|
|
|
|
|
croak "Wrong class $class" unless $self->isa('Geo::OSM::Primitive::Relation'); |
|
61
|
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
return $self; |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
} #_} |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
#_} |
|
67
|
|
|
|
|
|
|
#_{ POD: Copyright |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 Copyright |
|
70
|
|
|
|
|
|
|
Copyright © 2017 René Nyffenegger, Switzerland. All rights reserved. |
|
71
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
|
72
|
|
|
|
|
|
|
under the terms of the the Artistic License (2.0). You may obtain a |
|
73
|
|
|
|
|
|
|
copy of the full license at: L |
|
74
|
|
|
|
|
|
|
=cut |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
#_} |
|
77
|
|
|
|
|
|
|
#_{ POD: Source Code |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 Source Code |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
The source code is on L<< github|https://github.com/ReneNyffenegger/perl-Geo-OSM-Primitive >>. Meaningful pull requests are welcome. |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=cut |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
#_} |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
'tq84'; |