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
2
votes
3 answers

Geohash in redis with php

I am using Redis with php and its library phpredis. I have the following structure: city:1 { lat->14.02, lon->10.00, hash->sp2f1h60w5j } city:2 { lat->14.03, lon->10.1, hash->sp2f1h60w5m } But I haven't found a way to search by hash. I would…
2
votes
3 answers

Converting a number string into MD5 with python

Inspired by the XKCD geohashing comic (http://imgs.xkcd.com/comics/geohashing.png), I thought I'd have a go at coding a generator in Python. I've hit a block with the major part of it, though: The converting to MD5 and then to decimal. Is it at all…
dantdj
  • 1,237
  • 3
  • 19
  • 40
1
vote
0 answers

Is there a table for every country's geohash codes?

I'm working with geohash and looking for a table where every country linked to geohashes it occupied like Great Britain = g9 gc u1 gb. I need it for a proper data split. Is there such table?
Psijic
  • 743
  • 7
  • 20
1
vote
2 answers

Query Geohashes in firestore in JavaScript modular syntax

While going through Firebase's documentation for geohashing, Im using modular SDK, and I tried converting the namespace code, but I was encountering a TypeError that q.get is not a function // Find cities within Dkm of [lat, lng] const center =…
1
vote
0 answers

How to plot geohash with values on a map

value Geohash 2 w21zgk 5 w21z4q ... .... I would like to generate a choropleth map based on a table of geohashes with an associated value. I tried to convert this to a geodataframe so that I could plot it out with folium. To do this,…
imguessing
  • 377
  • 1
  • 3
  • 9
1
vote
1 answer

why is geohash different from postgis?

I'm a bit confused with Geohash Geoflutterfire vs Geohash postgis, and I would like to have some explanations, please. I have a Flutter Dart application that relies on Firebase. I am using the GeoFlutterFire plugin that Geohashes the addresses for…
xuairros
  • 53
  • 5
1
vote
1 answer

Proximityhash Type Error ,cannot convert the series to

import proximityhash # filtering the dataset with the required columns df_new=df.filter(['latitude', 'longitude','cell_radius']) # assign the column values to a variable latitude = df_new['latitude'] longitude = df_new['longitude'] radius=…
1
vote
0 answers

detect potholes on a road using geohash

I am trying to develop an app in flutter where it can detect potholes on roads and alert the user about 100 meters before he reaches it. What my implementation is, i haven taken the coordinates of the each pothole and then created a geohash with…
1
vote
0 answers

encode() Geohash of dataframe generates 'Invalid argument', but how?

import Geohash as gh gh.encode(35., -100., 7) works great! df.apply(lambda x: x.latitude*x.longitude, axis=1) also works great. But df.apply(lambda x: gh.encode(x.latitude, x.longitude, precision=7), axis=1) should work, but instead it generates a…
Keith
  • 1,777
  • 3
  • 15
  • 20
1
vote
1 answer

Geohashing with DynamoDB

I want to setup dynamodb in a way that I can query for events that fall in X radius using geohashes and then sort it by the startDateTime. The problem with BatchGetItem is that I can query multiple partition keys (geohash) at same time but cannot…
1
vote
1 answer

How to convert geohash to Latitude and Longitude in Kotlin

I have a String value as a geohash that I want to change it to latitude and longitude in Kotlin. I couldn't find any library for that. How can I convert geohash to latitude and longitude in Kotlin?
H Hooshyar
  • 137
  • 3
  • 15
1
vote
2 answers

Flutter-Firestore transform Stream>>> into List

I made a function where I want to return all places in my database which are inside a radius. Thats why Im using GeoFlutterFire. My problem its that I dont know how to convert Stream>>> into a List<> of my…
1
vote
1 answer

How to use a general list of conditions in awk filtering?

I use awk to filter geohash data in a csv file MYFILE, where the first column is the geohash. cat $MYFILE | awk -F ',' '{if( $1 = "^f20" || $1 = "^f28") print $0 }' > extractedFile The filtering is smooth and fast But now the conditions f20 and f28…
Xavier Prudent
  • 1,570
  • 3
  • 25
  • 54
1
vote
1 answer

Firestore query timestamp and geohash in one query

I'm attempting to query my Firestore database using both a timestamp and a geohash, but the results keep coming back as an empty array. If I only use the geohash or only use the timestamp then I got results, but no results when I use them together.…
1
vote
0 answers

React native and firestore: geohash nearby search to given distance with wrong results

I need to work with geohashs. I have to check if a target position as geohash is in the range (distance) of my current position as geohash. Its actually working but I have noticed large range differences. So I have written a Tester where I don't…
MarioGotti
  • 93
  • 12