geo_hex 3.1.3 → 3.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/geo_hex/version.rb +2 -2
- data/lib/geo_hex/zone.rb +8 -8
- metadata +30 -25
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 71651b79eb3e75df38e0ea72eeb3fd440e37b250
|
4
|
+
data.tar.gz: 91d7f94327133a4acd137cbcd08aa6c49661be8b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 053eb38af1f33a7e474f6b75087f1b4b701ee48939b4444ecc81cc5949354a1403a262ee83977102850c504e3e9bbd9100201a64165091750ee0b2e63cbcaf78
|
7
|
+
data.tar.gz: 824e827406a220aaf70e1c94549e16776d1cc4d6a78789d2650d565026c0fe31cfcf04dd142d6697340901db6433f07404839bfbc54430d75b4ce3962884a72d
|
data/lib/geo_hex/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module GeoHex
|
2
|
-
VERSION = "3.1.
|
3
|
-
end
|
2
|
+
VERSION = "3.1.4".freeze
|
3
|
+
end
|
data/lib/geo_hex/zone.rb
CHANGED
@@ -104,6 +104,12 @@ module GeoHex
|
|
104
104
|
[x, y, level]
|
105
105
|
end
|
106
106
|
|
107
|
+
# @return [Boolean] true if the zone is placed on the 180th meridian
|
108
|
+
def meridian_180?
|
109
|
+
return @meridian_180 if defined?(@meridian_180)
|
110
|
+
@meridian_180 = H_BASE - easting < unit.size
|
111
|
+
end
|
112
|
+
|
107
113
|
protected
|
108
114
|
|
109
115
|
# @param [String] code the GeoHex code
|
@@ -143,18 +149,12 @@ module GeoHex
|
|
143
149
|
1
|
144
150
|
end
|
145
151
|
|
146
|
-
code <<
|
152
|
+
code << (c3_x*3+c3_y).to_s
|
147
153
|
end
|
148
154
|
|
149
155
|
number = code[0..2].to_i
|
150
156
|
"#{H_KEY[number / 30]}#{H_KEY[number % 30]}#{code[3..-1]}"
|
151
157
|
end
|
152
158
|
|
153
|
-
# @return [Boolean] true if the zone is placed on the 180th meridian
|
154
|
-
def meridian_180?
|
155
|
-
return @meridian_180 if defined?(@meridian_180)
|
156
|
-
@meridian_180 = H_BASE - easting < unit.size
|
157
|
-
end
|
158
|
-
|
159
159
|
end
|
160
|
-
end
|
160
|
+
end
|
metadata
CHANGED
@@ -1,62 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geo_hex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
5
|
-
prerelease:
|
4
|
+
version: 3.1.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Dimitrij Denissenko
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-07-29 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rake
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: bundler
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rspec
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec-its
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
60
67
|
- !ruby/object:Gem::Version
|
61
68
|
version: '0'
|
62
69
|
description: Ruby implementation of GeoHex encoding algorithm
|
@@ -67,34 +74,32 @@ extra_rdoc_files: []
|
|
67
74
|
files:
|
68
75
|
- lib/geo_hex.rb
|
69
76
|
- lib/geo_hex/ll.rb
|
70
|
-
- lib/geo_hex/zone.rb
|
71
|
-
- lib/geo_hex/pp.rb
|
72
|
-
- lib/geo_hex/version.rb
|
73
77
|
- lib/geo_hex/polygon.rb
|
78
|
+
- lib/geo_hex/pp.rb
|
74
79
|
- lib/geo_hex/unit.rb
|
80
|
+
- lib/geo_hex/version.rb
|
81
|
+
- lib/geo_hex/zone.rb
|
75
82
|
homepage: https://github.com/bsm/geo_hex
|
76
83
|
licenses: []
|
84
|
+
metadata: {}
|
77
85
|
post_install_message:
|
78
86
|
rdoc_options: []
|
79
87
|
require_paths:
|
80
88
|
- lib
|
81
89
|
required_ruby_version: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
90
|
requirements:
|
84
|
-
- -
|
91
|
+
- - ">="
|
85
92
|
- !ruby/object:Gem::Version
|
86
93
|
version: 1.9.0
|
87
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
-
none: false
|
89
95
|
requirements:
|
90
|
-
- -
|
96
|
+
- - ">="
|
91
97
|
- !ruby/object:Gem::Version
|
92
98
|
version: 1.3.6
|
93
99
|
requirements: []
|
94
100
|
rubyforge_project:
|
95
|
-
rubygems_version:
|
101
|
+
rubygems_version: 2.2.2
|
96
102
|
signing_key:
|
97
|
-
specification_version:
|
103
|
+
specification_version: 4
|
98
104
|
summary: GeoHex (V3)
|
99
105
|
test_files: []
|
100
|
-
has_rdoc:
|