geonames-data 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/geonames/data/location_index.rb +4 -0
- data/lib/geonames/data/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db6797d864a475a5970f611f112e597c5bfae248
|
4
|
+
data.tar.gz: a241fd1339f520a136e64959db97bb34d695a966
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7c2b8de75ae7d8266bb6dcd5fdb121336dcd0cd11d85d3d4a63e4fb70d2dbc860d925a3436bb9a9f870ab055a179b7d7f957ddcffebcfb6d796ec1ef2bad4c9
|
7
|
+
data.tar.gz: 716e01ed1e8f44a1095a18c2a20a98f9125c35f665f7aab9ecd971c430bd046066434a7c77c3f02a20226609522d26f3017f5084a86247a3b88753000bc3f0a7
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Geonames::Data
|
2
2
|
|
3
|
+
[![Gem Version][gem-badge]][gem]
|
4
|
+
|
3
5
|
Library for working with [Geonames data][geonames-data].
|
4
6
|
|
5
7
|
## Installation
|
@@ -72,3 +74,5 @@ index.nearest(-37.814, 144.96332)
|
|
72
74
|
5. Create new Pull Request
|
73
75
|
|
74
76
|
[geonames-data]: http://download.geonames.org/export/dump
|
77
|
+
[gem-badge]: https://badge.fury.io/rb/geonames-data.svg
|
78
|
+
[gem]: http://badge.fury.io/rb/geonames-data
|
@@ -15,6 +15,10 @@ module Geonames
|
|
15
15
|
@features[@index.nearest(latitude, longitude)]
|
16
16
|
end
|
17
17
|
|
18
|
+
def nearestk(latitude, longitude, count)
|
19
|
+
@features.values_at(*@index.nearestk(latitude, longitude, count))
|
20
|
+
end
|
21
|
+
|
18
22
|
def self.load(filepath, &filter)
|
19
23
|
new(Features.load(filepath, filter))
|
20
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geonames-data
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Carney
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kdtree
|