lib/geonames/data/location_index.rb in geonames-data-0.0.1 vs lib/geonames/data/location_index.rb in geonames-data-0.1.0

- old
+ new

@@ -13,9 +13,13 @@ def nearest(latitude, longitude) @features[@index.nearest(latitude, longitude)] end + def nearestk(latitude, longitude, count) + @features.values_at(*@index.nearestk(latitude, longitude, count)) + end + def self.load(filepath, &filter) new(Features.load(filepath, filter)) end end end