Class: Geoq::Geohash
Instance Attribute Summary
Attributes inherited from Entity
Instance Method Summary collapse
Methods inherited from Entity
#as_geojson, #gh_string, #initialize, #to_geojson, #to_wkt
Constructor Details
This class inherits a constructor from Geoq::Entity
Instance Method Details
#gh_children ⇒ Object
51 52 53 |
# File 'lib/geoq/entity.rb', line 51 def gh_children BASE_32.chars.map { |char| raw + char } end |
#gh_neighbors(inclusive = false) ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/geoq/entity.rb', line 55 def gh_neighbors(inclusive = false) if inclusive [raw] + GeoHash.neighbors(raw) else GeoHash.neighbors(raw) end end |