Questions tagged [geohashing]

Geohash is a latitude/longitude encoding system using Base-32 characters.

Geohash is a latitude/longitude geocode system invented by Gustavo Niemeyer when writing the web service at geohash.org, and put into the public domain. It is a hierarchical spatial data structure which subdivides space, then interleaves the latitude and longitude information in a bitwise fashion.

Geohashes offer properties like arbitrary precision and the possibility of gradually removing characters from the end of the code to reduce its size (and gradually lose precision).

Nearby places will often (but not always) present similar prefixes. The longer a shared prefix is, the closer the two places are.

See https://en.wikipedia.org/wiki/Geohash

188 questions
3
votes
1 answer

Geohash queries in Google Cloud Datastore

I'm new to geohashing and am looking to implement it in Google Cloud Datastore. My goal is to store lat/long data in the form of a geohash and then query for all Entities around 400 meters from a given lat/long. Has anyone done this successfully…
3
votes
2 answers

Querying Geohashes in Firestore

Recently I've been playing around with Geohashes and Firestore. My todo scenario is to have a collection of documents (restaurants) and each restaurant will have list of Geohashes which delivers to. I want to avoid adding the geoashes in the…
3
votes
1 answer

Passing spark dataframe columns to geohash function - pyspark. Cannot convert column into bool:

import pygeohash as pgh pgh.encode(45,55) 'tpzpgxczbzur' The above steps are working great. Below I'm trying to create a data frame: l = [(45,25),(75,22),(85,20),(89,26)] rdd = sc.parallelize(l) geoCords = rdd.map(lambda x: Row(lat=x[0],…
Naresh Y
  • 271
  • 1
  • 4
  • 10
3
votes
0 answers

How to convert a GeoJSON polygon to a list of Geohashes of a given precision in ruby?

I'm currently working with combinations of geopoint + radius that I've successfully transformed to a GeoJSON polygon (loosing a bit of precision). What I need now is a conversion to a list of all Geohashes that intersects with that area with a…
Crystark
  • 3,693
  • 5
  • 40
  • 61
3
votes
2 answers

Are there any major disadvantages to having multiple clustering columns in cassandra?

I'm designing a cassandra table where I need to be able able to retrieve rows by their geohash. I have something that works, but I'd like to avoid range queries more so than I'm currently able to. The current table schema is this, with geo_key…
Loki
  • 6,205
  • 4
  • 24
  • 36
3
votes
1 answer

Kibana 3 GeoJSON vs Kibana4 Geohash

I was testing Kibana 4 beta2 when I realized that it's not possible to use a tilemap with an index from kibana3. With Kibana3 it's possible to put points on "Bettermap" using an array containin Long,Lat (GeoJson). "coordinates": [ -50.6667, …
patux
  • 31
  • 3
3
votes
3 answers

Geohash: How to calculate the eight surrounding boxes

I use the code from https://github.com/davetroy/geohash-js But I don't know how to calculate the surrounding geohashcode of a given geohashcode. I need to use the function witch calculate them both in php and javascript. Does anyone have such code…
Yellove
  • 165
  • 1
  • 2
  • 8
3
votes
1 answer

What are some efficient Geohash bounding box coverage algorithms?

My requirement is: Given a lat-lon bounding box, return a set of geohashes such that: The number of geohashes in the set should be small (1 to 5 geohash rectangles) if possible. The coverage should be as closed to the input lat-lon bounding box…
mobileideafactory
  • 1,640
  • 1
  • 22
  • 30
3
votes
0 answers

How does MongoDB handle range and nearest neighbor queries?

How does MongoDB handle range and nearest neighbor queries? what algorithms used? I know MongoDB use GeoHash and B-Tree to index spatial data but how it handle the range and nearest neighbor queries are never mentioned in any doc. Also, MongoDB can…
dykw
  • 1,199
  • 3
  • 13
  • 17
2
votes
3 answers

Distance between N images: incrementally! (same crop, but re-compressed/adjusted)

I'm trying to figure out a geo-hashing method for images. It is hard because the space of possible images is of much higher dimensionality than lat/lng. (geo-hashing converts a location to a string where the string progressively refines the…
Benjamin H
  • 5,164
  • 6
  • 34
  • 42
2
votes
2 answers

Flutter & firebase get docs by geohash

I'm trying to get a documents based on a geohash upper and lower bounds. 'Location A' is the location of a user, and we're trying to find other locations that are within the bounds of 'Location A' in firebase. I was following this…
chumberjosh
  • 400
  • 5
  • 19
2
votes
1 answer

Determine all geohashes for a given level

I am using the R package geohashTools and I'd like to know all possible geohashes for a given level/precision. One way to do this is brute force. # All possible coordinates coord <- expand.grid(lon =…
Dan
  • 11,370
  • 4
  • 43
  • 68
2
votes
0 answers

angular geohash unexpected token export

i'm using geohash to convert lat lng to a geohash. Todo so i implemented the library geohash.js. Unfortunately angular is saying "unexpected token export, which is at the bottom of the latlon-geohash.js: export default Geohash here is how i…
Silas
  • 161
  • 2
  • 10
2
votes
1 answer

Query GeoHashes in Firetore in range Android

What I'm trying is to get the documents that are in range of a point. Following the videos and taking a look to the geo-hash library for android, I'm able to get the bounding box and get the necessary geohashes to query in firebase. As…
Shudy
  • 7,806
  • 19
  • 63
  • 98
2
votes
2 answers

Unable to get bounding box of Geohash

I'm trying to get the bounding box (x,y coordinates) of geohashes using Python's geohash module. I'm able to successfully read in the geohashes and get their centroid, but when I try to use the geohash.bbox() method, it fails. Here's code: #import…
DiamondJoe12
  • 1,879
  • 7
  • 33
  • 81
1 2
3
12 13