Class: Geohash

Inherits:
Object
  • Object
show all
Defined in:
lib/geohash.rb,
ext/geohash_wrapper/geohash_wrapper.c

Class Method Summary collapse

Class Method Details

.decode(hash) ⇒ Object



5
6
7
# File 'lib/geohash.rb', line 5

def decode(hash)
  Geocoord.new(wrap_decode(hash)).freeze
end

.dimensions(precision) ⇒ Object



9
10
11
# File 'lib/geohash.rb', line 9

def dimensions(precision)
  Dimension.new(dimensions_for_precision(precision)).freeze
end

.dimensions_for_precisionObject



11
# File 'ext/geohash_wrapper/geohash_wrapper.c', line 11

VALUE wrap_geohash_dimensions_for_precision(VALUE self, VALUE precision);

.encodeObject



7
# File 'ext/geohash_wrapper/geohash_wrapper.c', line 7

VALUE wrap_geohash_encode(VALUE self, VALUE lat, VALUE lng, VALUE precision);

.neighbourObject



10
# File 'ext/geohash_wrapper/geohash_wrapper.c', line 10

VALUE wrap_geohash_neighbour(VALUE self, VALUE hash, VALUE direction);

.neighboursObject



9
# File 'ext/geohash_wrapper/geohash_wrapper.c', line 9

VALUE wrap_geohash_neighbours(VALUE self, VALUE hash);

.wrap_decodeObject



8
# File 'ext/geohash_wrapper/geohash_wrapper.c', line 8

VALUE wrap_geohash_decode(VALUE self, VALUE hash);