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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a44320d3a2e77a54cebfe239bcadc6b08609db8d
4
- data.tar.gz: 9864a5e8d03ff42fde1ac42cf51b6e05ceb2a94a
3
+ metadata.gz: db6797d864a475a5970f611f112e597c5bfae248
4
+ data.tar.gz: a241fd1339f520a136e64959db97bb34d695a966
5
5
  SHA512:
6
- metadata.gz: 2fd9681b61a61cbf253a66512c473bbe4ac23861fe626b1f8c8781c92916754df13d9fb191a9b44e44052e726f6962fc0b14aaf04958077848809a6160fbfc51
7
- data.tar.gz: 0a93f5a56136abe3ed8436af372741bea6be5514b7101d79aed81d5dc616afd84579967e4ecff1342772717776dae75d3ace3707177cdd0b84ef97552b54df46
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
@@ -1,5 +1,5 @@
1
1
  module Geonames
2
2
  module Data
3
- VERSION = "0.0.1"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  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.1
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-26 00:00:00.000000000 Z
11
+ date: 2014-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kdtree