Skip to main content

Questions tagged [geohash]

Geohashes are a way of encoding latitude/longitude points as strings. Geohashes are a hierarchical spatial data structure which subdivides space into buckets of grid shape

Filter by
Sorted by
Tagged with
0 votes
0 answers
28 views

Finding HASH algorithm and coding/decoding that in link address

I am using a website which is an online map service. every tile in this map service has a unique address and it is consist of X,Y,Z and R value. R value is only dependent on X and Y values (I think). ...
Naer Rahmani's user avatar
3 votes
2 answers
1k views

Get geohash neighbors with PostGIS

I’d like to get the 8 neighbors of the geohash grid. For example, the neighbors of the hashcode dqcjqc are dqcjqf,dqcjqb,dqcjr1,dqcjq9,dqcjqd,dqcjr4,dqcjr0,dqcjq8. I wonder how to do it in PostGIS? ...
Zekun's user avatar
  • 347
0 votes
2 answers
2k views

Visualizing GeoHashed data as polygons on QGIS

I have a .csv delimited text layer that includes a particular precision 7 geohash along with a certain measured value for the area represented by said geohash. For example: tc0fh3s,-101.0 tc0fxfg,-100....
Nandula's user avatar
  • 783
5 votes
1 answer
557 views

QGIS Field Calculator Expression - GeoHash32

I am attempting to write a QGIS 3.10 Field Calculator Expression that will use the mz2geohash library to encode the centroid of the current feature as LAT/LON, and then pass this tuple to the ...
Saijin_Naib - No To OpenAI's user avatar
2 votes
0 answers
507 views

Geohash for polygons? [closed]

I have multiple large polygon datasets stored in PostgreSQL 12 and will publish them using GeoServer. I want to try to use geohash to possibly speed up the performance of serving the polygon layers. I ...
ram_nl's user avatar
  • 179
1 vote
0 answers
70 views

QGIS and PostgreSQL viewing geom columns differently

I have a data set of 2 million points, my goal is to cluster the data using geohash codes. I have the geohash code at varying precisions for each point in their own columns. I created a table for ...
ram_nl's user avatar
  • 179
6 votes
1 answer
3k views

How to get all the sub-rectangles (subgeohashes) of a given geohash

I am trying to use geohash to generate a grid of rectangles to cover an area. But I am not very familiar with the coding system of geohash. My question is: If I have a specific geohash gh of 3 ...
tinlyx's user avatar
  • 11.2k
-1 votes
1 answer
490 views

Finding precision of polygon in Leaflet? [duplicate]

In order to convert coordinates to geohash I need to know the precision as well but unable to figure how to do so.. Any suggestions? ** EDIT ** What I try to do is to find the precision in leaflet ...
Tamir Gilany's user avatar
3 votes
1 answer
3k views

Better performance for geohash aggregation with PostGIS

I'm using the GeoNames (https://www.geonames.org/) dataset and want to aggregate the points in geohash of a specific precision. Beforehand I'm filtering with an bbox. So this is the query I came up ...
gemo1011's user avatar
  • 115
1 vote
1 answer
2k views

Getting geohash of LINESTRING in PostGIS?

I have some LINESTRING in PostGIS. LINESTRING(104.011 30.637,104.014 30.638,104.022 30.640,104.026 30.645) LINESTRING(104.022 30.666,104.031 30.659) LINESTRING(104.044 30.655,104.056 30.655) I ...
giser_yugang's user avatar
1 vote
0 answers
294 views

How to delete geohash rectangles from Leaflet?

I have been inspired by this code to create a geohash map for my Neo4j geohash graph on Leaflet: Unlike the (lat/lon) markers, the geohash string is represented as a rectangle in the map. For a ...
A.HADDAD's user avatar
  • 101
1 vote
0 answers
598 views

Geohash length to be reversible to LatLong using PostGIS

Decode/encode Geohashes are easy, and there are a "rule of the thumb" for estimat mininal Geohashe length for each LatLong precision. The question is other: precision for revesibility, How many ...
Peter Krauss's user avatar
  • 2,354
4 votes
2 answers
3k views

Server side clustering with geohash

I need help with clustering algorithm. I have a mysql database with lat, lng, geohash(12 chars). I am usign this query to select all records for zoom level 2 (2 chars) SELECT COUNT( id ) , LEFT( `...
SERG's user avatar
  • 273
3 votes
1 answer
2k views

Generating a single geohash for a bounding box in python

the following code generates bounding box for the coordinates that are given in the input but currently it generates geohashes for all the 4 coordinates of the polygon. i want to be able to generate a ...
Rehan Chaudhary's user avatar
2 votes
0 answers
888 views

Geo-hash finding nearest neighbour with massively variable distance to actual nearest neighbour

I have a series of points in lat-long space, ranging from having their nearest neighbour very close to 1000s of km away. Say I do a geo-hash of these to a high precision, my search of nearest ...
Daniel Swiegers's user avatar
0 votes
0 answers
801 views

Geohash clustring on Leaflet

Leaflet has a markerclustring plugin that clusters markers. I am asking is there a solution to cluster your (lat/lon) with Geohash on Leaflet map in the a similar way to that on Kibana?
A.HADDAD's user avatar
  • 101
2 votes
1 answer
2k views

Convert geohash to shape/kml

I have a requirement where I need to convert a set of Geohash to KML files such that they can be used as areas to plot data by overlaying on map. Is anyone aware of an open resource which can help ...
nehalkum's user avatar
2 votes
0 answers
625 views

How to take a set of geohashes and determine which ones are neighbors?

I'm trying to figure out the optimal way to take a list of geohashes and return a sub-list that contains the geohashes that are direct neighbors or have direct neighbors in common (aka - creating ...
Abe Miessler's user avatar
1 vote
0 answers
94 views

Pyqgis script to join delimited text layer on KML and create graduated symbols

I need to create multiple maps from QGIS which have the same procedure and so wanted to write a script. I found little help in terms of how to join delimited text layer to a KML vector layer(of ...
zingsy's user avatar
  • 121
5 votes
1 answer
3k views

How to decide geohash length based on zoom level?

I want to decide geohash length based on zoom level, how can I do that because so far I am unable to find any standard way to do so? For example, current zoom level is 10 and geohash is "...
VVB's user avatar
  • 151
0 votes
0 answers
563 views

Geohash using decimal

I'm quite new to spatial data processing and got to work with some existing legacy data which isnt well documented. I see that in the SQL database geohash values stored along with lat and lon but they ...
seninp's user avatar
  • 101
5 votes
1 answer
584 views

How does Google S2 / Hilbert Curve handle the outliers?

Regarding Google S2 library, it used for a quick indexing on locations. E.g. near by locations would have similar indices. Thus it's much easier to make location queries. But, as we map a 2-D point to ...
Weishi Z's user avatar
  • 151
5 votes
1 answer
6k views

Understanding the s2 library (geometry on the sphere, cells and Hilbert curve) for finding points nearby

I am having trouble understanding how the S2 library works so things in this question may make no sense, but I have a goal I would like to accomplish. Lets say I have many lat/lng point I want to ...
user2924127's user avatar
10 votes
1 answer
7k views

Calculating Optimal Geohash Precision from Bounding Box

I'm using Elasticsearch's GeoHash grid Aggregation to plot clusters on a map (using Leaflet). I understand that for larger areas a lower precision setting should be used to limit the number of buckets ...
Peter's user avatar
  • 203
1 vote
1 answer
2k views

Converting files to S2 cell IDs

I would like to use Google's S2 library to convert geospatial data (for instance shapefiles or geojson files) to S2 cell IDs. The data I want to convert is made of polygons. I saw there exists this ...
Robin's user avatar
  • 235
2 votes
1 answer
1k views

Using PostGIS Geohash function to run through column of coordinates and dump results in new column?

I'm new to databases. How can I use the PostGIS Geohash function to run through a column of coordinates and dump results in new column? Here is the postgis documentation on it Here's what my data ...
edgrmdna's user avatar
6 votes
0 answers
1k views

Efficiency differences between quadtree and geohashes [closed]

I am a newbie to spatial indexing. Can someone please explain me the differences between a quad-tree and geohash. From what I understand both use similar hierarchial methods of dividing the space into ...
user89666's user avatar
8 votes
5 answers
10k views

Library to convert polygon to geohash

There are plenty of Python libraries that convert Point to geohash. I need to convert an area, enclosed in Polygon to do that. I can't just go around the perimeter points, I'll have a hole inside. ...
kaboom's user avatar
  • 197
1 vote
0 answers
221 views

Hash function to generate grid cell Id

I'm new to GIS and I have 'part of' a problem to solve. Basically I have road details in geojson (WGS84) with LineString of points covering a 100KM square. I'm designing an architecture to snap a ...
CVP's user avatar
  • 11
2 votes
0 answers
405 views

Optimize Postgis contour lines DB

I'd like to try to optimize a world-wide 10m contour lines (isohypses) Postgis database(from SRTM). The complete DB takes 504GB on disk, contour lines are already in epsg:3857, and simplified with ...
yvecai's user avatar
  • 101
8 votes
1 answer
7k views

How to get the geohash of a bounding box?

I am storing a large collection of 5m x 5m geohash values. I want to be able to query this collection and find all the geohash values which fall within a particular georect - which is defined by a 2 ...
jcm's user avatar
  • 181
3 votes
1 answer
1k views

Understanding geohash and its associated rectangles

If I decode geohash sj8101b0858n85202hbh0j I get rectangle defined by min latitude, min longitude, max latitude, max longitude. My understanding is that if I decode first part of any hash (e.g. ...
Atul's user avatar
  • 158
3 votes
1 answer
9k views

Google's S2 library - any alternatives? [closed]

Is there any alternative to Google's S2 geometry library? It looks it was updated 4 years back and hardly any documentation. I need a library to divide cities into zones of the area I need. S2 looks ...
Spiralarchitect's user avatar
2 votes
0 answers
954 views

How to use Morton Order(z order curve) in range search?

How to use Morton Order in range search? From the wiki, In the paragraph "Use with one-dimensional data structures for range searching", it says: the range being queried (x = 2, ..., 3, y = 2, ....
gfan's user avatar
  • 121
4 votes
1 answer
7k views

Generating Heat Maps with GeoHash

I have a long list of GeoHash codes for a certain geographic region. I'm using 6-character precision so for example if the area under study was Earl's Court in London, I would have a few six letter ...
xupv5's user avatar
  • 141
9 votes
2 answers
15k views

Fastest strategy for proximity searches in SQL Server

I am using SQL Server 2012. I'm implementing a back end for a mobile app which will have to do proximity searches to find nearby POIs (points os interest). I know it's a very common scenario and looks ...
Loudenvier's user avatar
32 votes
2 answers
53k views

What is the precision of Geohash?

I would like to know the precision of a Geohash with a given length. If there is a 'simple' formula you can use to calculate it, that would be extra-cool. Wikipedia lists the precision up to 8 ...
Gundon's user avatar
  • 383
21 votes
1 answer
8k views

Advantages of R-trees in comparison to geohashes

Geohashes are being widely used in products like: Lucene, mongodb, etc and have become one of the most important technology of present day. Have Geohashes replaced the good old R-trees or do R-trees ...
Jannat Arora's user avatar
2 votes
1 answer
1k views

Algorithm to find geohashes which satisfy query condition

I have an application where I need to query geohashes by specifying the bounding rectangle. Since geohashes map 2D to 1D is there a method by which I may find the prefixes of all geohashes which ...
Jannat Arora's user avatar
8 votes
1 answer
2k views

What is the internal format of PostGIS?

PostGIS stores its geometry entities as long strings: SELECT ST_GeomFromText('POINT(32.0 34.0)',4326); st_geomfromtext ---------------------------------------------------- ...
Adam Matan's user avatar
  • 6,878
14 votes
5 answers
15k views

Methods for geohash of polygon?

GeoHash is an excellent method to code the latitude and longitude of a point into a string. It's concise, due to the use of numbers + letters, and the precision can be tuned adding characters at the ...
Sylvain Lesage's user avatar
11 votes
2 answers
8k views

Are there trade offs between using a geohash vs using a quadkey as a spatial index?

QuadKey Bing Maps uses a quadkey structure for their tiling scheme. Here is an overview of the concept http://msdn.microsoft.com/en-us/library/bb259689.aspx. GeoHash A geohash seems to be the more ...
agentargo's user avatar
  • 111
1 vote
1 answer
446 views

Longest common prefix of geohashed points

I currently use Geohash to index some points and retrieve information faster by providing a geohash prefix for a given point for a given distance.. For example if I get a given point at '1600 ...
gisgraphy's user avatar
  • 520
4 votes
0 answers
2k views

Clustering table on geohash index and geohash ordered table [closed]

Could there be a performance gain by reorganizing the rows in a table by Geohash and then CLUSTERing this table on the Geohash index of the geometries? CREATE TEMPORARY TABLE tmptbl AS SELECT *, (...
aurel_nc's user avatar
  • 612
47 votes
6 answers
58k views

Using geohash for proximity searches

I'm looking to optimize point proximity geo searches time. My input is lat,lng point and I'm searching on a precomputed set of locations to n nearest points. I don't care how much time/space the ...
Maxim Veksler's user avatar