line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geo::JSON::Types; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.007'; |
4
|
|
|
|
|
|
|
|
5
|
6
|
|
|
6
|
|
61526
|
use strict; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
237
|
|
6
|
6
|
|
|
6
|
|
28
|
use warnings; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
328
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
BEGIN { |
9
|
6
|
|
|
|
|
83
|
use Type::Library -base, -declare => qw/ |
10
|
|
|
|
|
|
|
CRS |
11
|
|
|
|
|
|
|
Feature |
12
|
|
|
|
|
|
|
Features |
13
|
|
|
|
|
|
|
Geometry |
14
|
|
|
|
|
|
|
LinearRing |
15
|
|
|
|
|
|
|
LineString |
16
|
|
|
|
|
|
|
LineStrings |
17
|
|
|
|
|
|
|
Polygon |
18
|
|
|
|
|
|
|
Polygons |
19
|
|
|
|
|
|
|
Position |
20
|
|
|
|
|
|
|
Positions |
21
|
6
|
|
|
6
|
|
1350
|
/; |
|
6
|
|
|
|
|
61211
|
|
22
|
6
|
|
|
6
|
|
11411
|
use Type::Utils; |
|
6
|
|
|
|
|
16594
|
|
|
6
|
|
|
|
|
54
|
|
23
|
6
|
|
|
6
|
|
8818
|
use Types::Standard -types; |
|
6
|
|
|
|
|
110106
|
|
|
6
|
|
|
|
|
64
|
|
24
|
|
|
|
|
|
|
|
25
|
6
|
|
|
6
|
|
25535
|
use Geo::JSON::Utils qw/ compare_positions /; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
2734
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
declare Position, # |
28
|
|
|
|
|
|
|
as ArrayRef [Num], # |
29
|
6
|
|
|
6
|
|
27
|
where { @{$_} >= 2 }; |
|
1809
|
|
|
|
|
129025
|
|
|
1809
|
|
|
|
|
2580
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
declare Positions, # |
32
|
|
|
|
|
|
|
as ArrayRef [Position], # |
33
|
6
|
|
|
|
|
21746
|
where { @{$_} > 0 }; |
|
59
|
|
|
|
|
622
|
|
|
59
|
|
|
|
|
140
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
declare LineString, # |
36
|
|
|
|
|
|
|
as Positions, # |
37
|
6
|
|
|
|
|
5941
|
where { @{$_} >= 2 }; |
|
51
|
|
|
|
|
268
|
|
|
51
|
|
|
|
|
111
|
|
38
|
|
|
|
|
|
|
|
39
|
6
|
|
|
|
|
3802
|
declare LineStrings, # |
40
|
|
|
|
|
|
|
as ArrayRef [LineString]; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
declare LinearRing, # |
43
|
|
|
|
|
|
|
as LineString, # |
44
|
6
|
50
|
|
|
|
6673
|
where { @{$_} >= 4 && compare_positions( $_->[0], $_->[-1] ) }; |
|
30
|
|
|
|
|
163
|
|
|
30
|
|
|
|
|
208
|
|
45
|
|
|
|
|
|
|
|
46
|
6
|
|
|
|
|
4218
|
declare Polygon, # |
47
|
|
|
|
|
|
|
as ArrayRef [LinearRing]; |
48
|
|
|
|
|
|
|
|
49
|
6
|
|
|
|
|
6227
|
declare Polygons, # |
50
|
|
|
|
|
|
|
as ArrayRef [Polygon]; |
51
|
|
|
|
|
|
|
|
52
|
6
|
|
|
|
|
6279
|
declare Geometry, as Object, where { $_->does("Geo::JSON::Role::Geometry") }; |
|
47
|
|
|
|
|
21775
|
|
53
|
|
|
|
|
|
|
|
54
|
6
|
|
|
|
|
4008
|
class_type CRS, { class => 'Geo::JSON::CRS' }; |
55
|
6
|
|
|
|
|
21339
|
class_type Feature, { class => 'Geo::JSON::Feature' }; |
56
|
|
|
|
|
|
|
|
57
|
6
|
|
|
|
|
4231
|
coerce CRS, from HashRef, q{ 'Geo::JSON::CRS'->new($_) }; |
58
|
|
|
|
|
|
|
|
59
|
6
|
|
|
|
|
1669
|
coerce Feature, from HashRef, q{ 'Geo::JSON'->load( $_ ) }; |
60
|
|
|
|
|
|
|
|
61
|
6
|
|
|
|
|
986
|
coerce Geometry, from HashRef, q{ 'Geo::JSON'->load( $_ ) }; |
62
|
|
|
|
|
|
|
|
63
|
6
|
|
|
|
|
948
|
declare Features, as ArrayRef [Feature], coercion => 1; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
__END__ |