SlideShare a Scribd company logo
1 of 19
Download to read offline
GeoHash
encode(lat/long) --> 'string'
What's the plan today?
What is geohash?
Why do we need it?
geohash.org
How does it work?
Grouping and Zooming
Nearby (proximity) searches
The Edge case
Limitations
Demo (Let's see it working)
Who am I?
Co-Founded Ideophone with @oligoglot & @anenth
helped building @pyka, @suruk, @onetouchsos,
@kopa_app
product architecture, platform development
x-SunTec, x-TAT, mtech from IIIT-B
What is geohash?
Simple way to encode lat/long into a string
Compact string encoding of geographic coordinate with
arbitrary precision
    Bangalore - TDR1, Domlur - TDR1WX




Invented by Gustavo Niemeyer for geohash.org
Available in public domain http://en.wikipedia.org/wiki/geohash/
Why do we need it when we have LL?
Big address of this venue
Complicated Lat/Long {12.963787,77.637789}




      The Mail from Cartonama could've said Venue:
                    "tdr1wxyp5dn7v"
● Subdivides space into "buckets" of grid shape
● Doesn't really represent a point, rather a bounding
   area in which the point is present
● Hierarchical spatial structure with gradual degradation
● Longer the geohash
   -> Smaller the area


Demo
How does it work?




11001 01100 10111 00001 11100 11101 11110 10101 00101 01100 10100 00111 11011
  t     d     r    1     w     x    y     p       5     d     n      7    v !
geohash.org
              Short URL uniquely
              identifying points on
              earth




              Referencing them on
              emails, website etc
              becomes far more
              convenient




              Bangalore:
              http://geohash.org/tdr1
              Domlur:
              http://geohash.
              org/tdr1wx
Grouping and Zooming
Easy grouping
   ○ tdr1wxyp5dn7v -> {12.9637069, 77.6377931}
         ●   4th Main Rd, Domlur II Stage, Domlur, Bengaluru, Karnataka

   ○ tdr1wxyp5dn7v -> {12.9637, 77.6378}
         ●   Domlur, Bengaluru, Karnataka

   ○ tdr1wxyp5dn7v -> {12.96, 77.64}
         ●   Bengaluru, Karnataka

   ○ tdr1wxyp5dn7v -> {13, 78}
         ●   Malur-Bangarapettu Rd
Nearby (Proximity) Search

● Nearby locations usually share similar prefixes.
● Long common prefixes indicate two places are near,
   however two nearby places do not always have
   common prefixes
There is an Edge Case:
E.g. Two nearby places in Boston
DRT..
DRM..
Nearby Search
tdr1wxyp5dn7v (TERI)
tdr1wxyqekmg (Bangalore I'ntl Chapter)
tdr1y8jbvrmc (Domlur Club)
tdr1y8jykh6w (CIS)
tdr1ybmhdj4p (Ideophone)
tdr1v4e3mecx (Majestic Station)
tf346wn2t49t (Chennai Central)
9q8vzpgn7we0 (SFO Airport)
Finding Nearby Places
Python, Perl, PHP, Java etc
python-geohash
    ○   Encode/Decode
    ○   BoundingBox
           {'s': 12.919921875,

           'e': 77.6513671875,

           'w': 77.607421875,

           'n': 12.9638671875}

    ○   Neighbours
           ['ezefx','ezefr','ezefp','ezs40',

           'ezs41','ezs43','ezs49','ezs48']
Finding Nearby Places
● Proximity Search
   ○ Bottoms-Up




                        ● Bounding Box Search
                           ○ Hops to neighbors
                             until POI is found
Finding Nearby Places

● Compute geohash
  values for all Lat/Long
● Have index on
  geohash for quicker
  retrievals
Finding Nearby Places
● Prefix Match:
   SELECT * FROM table WHERE place_geohash LIKE hashcode%

● Expand/Neighbors Match
   SELECT * FROM table WHERE place_geohash IN (geohash.expand('tzxy1'))
Limitations

● Locality Anomalies
   ○ Complicates Proximity Searches
   ○ Need to use bounding box extensively making
      search an expensive operation



● Projection based model
   ○ A geohash of given length will denote different
      region size in poles than in equator region
Demo
http://openlocation.org/geohash/geohash-js/
http://geohash.gofreerange.com/
Conclusions

● Simple and effective system to map complex lat-long
   coordinates into simple string representations



● Useful in applications where "nearness" of POIs is
   more relevant than accurate distance computation



● Enables quick db access using LIKE using grouping of
   prefixes of geohashes
Thank you!
@sandeepbhaskar
https://github.com/sandeepbhaskar/geohash-demo

More Related Content

What's hot

What's hot (20)

Hashing
HashingHashing
Hashing
 
Lecture24
Lecture24Lecture24
Lecture24
 
Image classification and land cover mapping
Image classification and land cover mappingImage classification and land cover mapping
Image classification and land cover mapping
 
Hadoop HDFS Concepts
Hadoop HDFS ConceptsHadoop HDFS Concepts
Hadoop HDFS Concepts
 
Apache Sedona: how to process petabytes of agronomic data with Spark
Apache Sedona: how to process petabytes of agronomic data with SparkApache Sedona: how to process petabytes of agronomic data with Spark
Apache Sedona: how to process petabytes of agronomic data with Spark
 
GIS file types
GIS file typesGIS file types
GIS file types
 
[JSDC 2015] Turf.js - 地理資訊的分析與地圖視覺化
[JSDC 2015] Turf.js - 地理資訊的分析與地圖視覺化[JSDC 2015] Turf.js - 地理資訊的分析與地圖視覺化
[JSDC 2015] Turf.js - 地理資訊的分析與地圖視覺化
 
Introduction to Apache solr
Introduction to Apache solrIntroduction to Apache solr
Introduction to Apache solr
 
MapReduce: Simplified Data Processing on Large Clusters
MapReduce: Simplified Data Processing on Large ClustersMapReduce: Simplified Data Processing on Large Clusters
MapReduce: Simplified Data Processing on Large Clusters
 
GIS fundamentals - vector
GIS fundamentals - vectorGIS fundamentals - vector
GIS fundamentals - vector
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Introduction To PostGIS
Introduction To PostGISIntroduction To PostGIS
Introduction To PostGIS
 
Spatial Databases
Spatial DatabasesSpatial Databases
Spatial Databases
 
gSpan algorithm
gSpan algorithmgSpan algorithm
gSpan algorithm
 
GeoServer, an introduction for beginners
GeoServer, an introduction for beginnersGeoServer, an introduction for beginners
GeoServer, an introduction for beginners
 
Introduction of Open Source GIS
Introduction of Open Source GISIntroduction of Open Source GIS
Introduction of Open Source GIS
 
Geographic Information System unit 4
Geographic Information System   unit 4Geographic Information System   unit 4
Geographic Information System unit 4
 
Neo4j Bloom: What’s New with Neo4j's Data Visualization Tool
Neo4j Bloom: What’s New with Neo4j's Data Visualization ToolNeo4j Bloom: What’s New with Neo4j's Data Visualization Tool
Neo4j Bloom: What’s New with Neo4j's Data Visualization Tool
 
Getting Started with PostGIS
Getting Started with PostGISGetting Started with PostGIS
Getting Started with PostGIS
 
Introduction to-arc map
Introduction to-arc mapIntroduction to-arc map
Introduction to-arc map
 

Viewers also liked

"Spark Search" - In-memory, Distributed Search with Lucene, Spark, and Tachyo...
"Spark Search" - In-memory, Distributed Search with Lucene, Spark, and Tachyo..."Spark Search" - In-memory, Distributed Search with Lucene, Spark, and Tachyo...
"Spark Search" - In-memory, Distributed Search with Lucene, Spark, and Tachyo...
Lucidworks
 

Viewers also liked (16)

Spatial search with geohashes
Spatial search with geohashesSpatial search with geohashes
Spatial search with geohashes
 
Scaling GIS Data in Non-relational Data Stores
Scaling GIS Data in Non-relational Data StoresScaling GIS Data in Non-relational Data Stores
Scaling GIS Data in Non-relational Data Stores
 
Architecture at SimpleGeo: Staying Agile at Scale
Architecture at SimpleGeo: Staying Agile at ScaleArchitecture at SimpleGeo: Staying Agile at Scale
Architecture at SimpleGeo: Staying Agile at Scale
 
GeoPackage, Context and POI (and a sprinkle of GeoJSON)
GeoPackage, Context and POI (and a sprinkle of GeoJSON)GeoPackage, Context and POI (and a sprinkle of GeoJSON)
GeoPackage, Context and POI (and a sprinkle of GeoJSON)
 
Geohash in mapping applications
Geohash in mapping applicationsGeohash in mapping applications
Geohash in mapping applications
 
投影法
投影法投影法
投影法
 
Serverless Geospatial Mobile Apps with AWS
Serverless Geospatial Mobile Apps with AWSServerless Geospatial Mobile Apps with AWS
Serverless Geospatial Mobile Apps with AWS
 
Osc2012 spring HBase Report
Osc2012 spring HBase ReportOsc2012 spring HBase Report
Osc2012 spring HBase Report
 
How To Analyze Geolocation Data with Hive and Hadoop
How To Analyze Geolocation Data with Hive and HadoopHow To Analyze Geolocation Data with Hive and Hadoop
How To Analyze Geolocation Data with Hive and Hadoop
 
"Spark Search" - In-memory, Distributed Search with Lucene, Spark, and Tachyo...
"Spark Search" - In-memory, Distributed Search with Lucene, Spark, and Tachyo..."Spark Search" - In-memory, Distributed Search with Lucene, Spark, and Tachyo...
"Spark Search" - In-memory, Distributed Search with Lucene, Spark, and Tachyo...
 
Facebook Messages & HBase
Facebook Messages & HBaseFacebook Messages & HBase
Facebook Messages & HBase
 
Spark: Interactive To Production
Spark: Interactive To ProductionSpark: Interactive To Production
Spark: Interactive To Production
 
LuceneRDD for (Geospatial) Search and Entity Linkage
LuceneRDD for (Geospatial) Search and Entity LinkageLuceneRDD for (Geospatial) Search and Entity Linkage
LuceneRDD for (Geospatial) Search and Entity Linkage
 
GraphQL 101
GraphQL 101GraphQL 101
GraphQL 101
 
GIS presentation
GIS presentationGIS presentation
GIS presentation
 
Drizzle—Low Latency Execution for Apache Spark: Spark Summit East talk by Shi...
Drizzle—Low Latency Execution for Apache Spark: Spark Summit East talk by Shi...Drizzle—Low Latency Execution for Apache Spark: Spark Summit East talk by Shi...
Drizzle—Low Latency Execution for Apache Spark: Spark Summit East talk by Shi...
 

Similar to Geohash

Location Analytics Real-Time Geofencing using Kafka
Location Analytics Real-Time Geofencing using KafkaLocation Analytics Real-Time Geofencing using Kafka
Location Analytics Real-Time Geofencing using Kafka
Guido Schmutz
 
mini project_shortest path visualizer.pptx
mini project_shortest path visualizer.pptxmini project_shortest path visualizer.pptx
mini project_shortest path visualizer.pptx
tusharpawar803067
 
Introduction To Geocoding: Linda Achieng
Introduction To Geocoding: Linda AchiengIntroduction To Geocoding: Linda Achieng
Introduction To Geocoding: Linda Achieng
Redis Labs
 
Let Android dream electric sheep: Making emotion model for chat-bot with Pyth...
Let Android dream electric sheep: Making emotion model for chat-bot with Pyth...Let Android dream electric sheep: Making emotion model for chat-bot with Pyth...
Let Android dream electric sheep: Making emotion model for chat-bot with Pyth...
Jeongkyu Shin
 

Similar to Geohash (20)

Locality Sensitive Hashing By Spark
Locality Sensitive Hashing By SparkLocality Sensitive Hashing By Spark
Locality Sensitive Hashing By Spark
 
Real-time GeoSearching at Scale with RediSearch by Apoorva Gaurav and Ronil M...
Real-time GeoSearching at Scale with RediSearch by Apoorva Gaurav and Ronil M...Real-time GeoSearching at Scale with RediSearch by Apoorva Gaurav and Ronil M...
Real-time GeoSearching at Scale with RediSearch by Apoorva Gaurav and Ronil M...
 
Geo data analytics
Geo data analyticsGeo data analytics
Geo data analytics
 
VenmoPlus demo week6
VenmoPlus demo week6VenmoPlus demo week6
VenmoPlus demo week6
 
Shortest route finding using an object oriented database approach
Shortest route finding using an object oriented database approachShortest route finding using an object oriented database approach
Shortest route finding using an object oriented database approach
 
Magellan FOSS4G Talk, Boston 2017
Magellan FOSS4G Talk, Boston 2017Magellan FOSS4G Talk, Boston 2017
Magellan FOSS4G Talk, Boston 2017
 
2017 RM-URISA Track: Spatial SQL - The Best Kept Secret in the Geospatial World
2017 RM-URISA Track:  Spatial SQL - The Best Kept Secret in the Geospatial World2017 RM-URISA Track:  Spatial SQL - The Best Kept Secret in the Geospatial World
2017 RM-URISA Track: Spatial SQL - The Best Kept Secret in the Geospatial World
 
Approximate shortest distance computing
Approximate shortest distance computingApproximate shortest distance computing
Approximate shortest distance computing
 
Bandwidth distributed denial of service attacks and defenses
Bandwidth distributed denial of service attacks and defensesBandwidth distributed denial of service attacks and defenses
Bandwidth distributed denial of service attacks and defenses
 
Location Analytics Real-Time Geofencing using Kafka
Location Analytics Real-Time Geofencing using KafkaLocation Analytics Real-Time Geofencing using Kafka
Location Analytics Real-Time Geofencing using Kafka
 
mini project_shortest path visualizer.pptx
mini project_shortest path visualizer.pptxmini project_shortest path visualizer.pptx
mini project_shortest path visualizer.pptx
 
Node Path Visualizer Using Shortest Path Algorithms
Node Path Visualizer Using Shortest Path AlgorithmsNode Path Visualizer Using Shortest Path Algorithms
Node Path Visualizer Using Shortest Path Algorithms
 
Introduction To Geocoding: Linda Achieng
Introduction To Geocoding: Linda AchiengIntroduction To Geocoding: Linda Achieng
Introduction To Geocoding: Linda Achieng
 
Postgres Vision 2018: PostGIS and Spatial Extensions
Postgres Vision 2018: PostGIS and Spatial ExtensionsPostgres Vision 2018: PostGIS and Spatial Extensions
Postgres Vision 2018: PostGIS and Spatial Extensions
 
Corinne Hutchinson's 7/8/2015 PuPPy Presentation on GeoDjango
Corinne Hutchinson's 7/8/2015 PuPPy Presentation on GeoDjangoCorinne Hutchinson's 7/8/2015 PuPPy Presentation on GeoDjango
Corinne Hutchinson's 7/8/2015 PuPPy Presentation on GeoDjango
 
How to Analyze & Optimize Mobility with Geospatial Data (Snowflake).pdf
How to Analyze & Optimize Mobility with Geospatial Data (Snowflake).pdfHow to Analyze & Optimize Mobility with Geospatial Data (Snowflake).pdf
How to Analyze & Optimize Mobility with Geospatial Data (Snowflake).pdf
 
Let Android dream electric sheep: Making emotion model for chat-bot with Pyth...
Let Android dream electric sheep: Making emotion model for chat-bot with Pyth...Let Android dream electric sheep: Making emotion model for chat-bot with Pyth...
Let Android dream electric sheep: Making emotion model for chat-bot with Pyth...
 
Евгений Хыст: "Server-Side Geo-Clustering Based on Geohash"
Евгений Хыст: "Server-Side Geo-Clustering Based on Geohash"Евгений Хыст: "Server-Side Geo-Clustering Based on Geohash"
Евгений Хыст: "Server-Side Geo-Clustering Based on Geohash"
 
distance_matrix_ch
distance_matrix_chdistance_matrix_ch
distance_matrix_ch
 
Lecture 8: IoT System Models and Applications
Lecture 8: IoT System Models and ApplicationsLecture 8: IoT System Models and Applications
Lecture 8: IoT System Models and Applications
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 

Geohash

  • 2. What's the plan today? What is geohash? Why do we need it? geohash.org How does it work? Grouping and Zooming Nearby (proximity) searches The Edge case Limitations Demo (Let's see it working)
  • 3. Who am I? Co-Founded Ideophone with @oligoglot & @anenth helped building @pyka, @suruk, @onetouchsos, @kopa_app product architecture, platform development x-SunTec, x-TAT, mtech from IIIT-B
  • 4. What is geohash? Simple way to encode lat/long into a string Compact string encoding of geographic coordinate with arbitrary precision Bangalore - TDR1, Domlur - TDR1WX Invented by Gustavo Niemeyer for geohash.org Available in public domain http://en.wikipedia.org/wiki/geohash/
  • 5. Why do we need it when we have LL? Big address of this venue Complicated Lat/Long {12.963787,77.637789} The Mail from Cartonama could've said Venue: "tdr1wxyp5dn7v"
  • 6. ● Subdivides space into "buckets" of grid shape ● Doesn't really represent a point, rather a bounding area in which the point is present ● Hierarchical spatial structure with gradual degradation ● Longer the geohash -> Smaller the area Demo
  • 7. How does it work? 11001 01100 10111 00001 11100 11101 11110 10101 00101 01100 10100 00111 11011 t d r 1 w x y p 5 d n 7 v !
  • 8. geohash.org Short URL uniquely identifying points on earth Referencing them on emails, website etc becomes far more convenient Bangalore: http://geohash.org/tdr1 Domlur: http://geohash. org/tdr1wx
  • 9. Grouping and Zooming Easy grouping ○ tdr1wxyp5dn7v -> {12.9637069, 77.6377931} ● 4th Main Rd, Domlur II Stage, Domlur, Bengaluru, Karnataka ○ tdr1wxyp5dn7v -> {12.9637, 77.6378} ● Domlur, Bengaluru, Karnataka ○ tdr1wxyp5dn7v -> {12.96, 77.64} ● Bengaluru, Karnataka ○ tdr1wxyp5dn7v -> {13, 78} ● Malur-Bangarapettu Rd
  • 10. Nearby (Proximity) Search ● Nearby locations usually share similar prefixes. ● Long common prefixes indicate two places are near, however two nearby places do not always have common prefixes There is an Edge Case: E.g. Two nearby places in Boston DRT.. DRM..
  • 11. Nearby Search tdr1wxyp5dn7v (TERI) tdr1wxyqekmg (Bangalore I'ntl Chapter) tdr1y8jbvrmc (Domlur Club) tdr1y8jykh6w (CIS) tdr1ybmhdj4p (Ideophone) tdr1v4e3mecx (Majestic Station) tf346wn2t49t (Chennai Central) 9q8vzpgn7we0 (SFO Airport)
  • 12. Finding Nearby Places Python, Perl, PHP, Java etc python-geohash ○ Encode/Decode ○ BoundingBox {'s': 12.919921875, 'e': 77.6513671875, 'w': 77.607421875, 'n': 12.9638671875} ○ Neighbours ['ezefx','ezefr','ezefp','ezs40', 'ezs41','ezs43','ezs49','ezs48']
  • 13. Finding Nearby Places ● Proximity Search ○ Bottoms-Up ● Bounding Box Search ○ Hops to neighbors until POI is found
  • 14. Finding Nearby Places ● Compute geohash values for all Lat/Long ● Have index on geohash for quicker retrievals
  • 15. Finding Nearby Places ● Prefix Match: SELECT * FROM table WHERE place_geohash LIKE hashcode% ● Expand/Neighbors Match SELECT * FROM table WHERE place_geohash IN (geohash.expand('tzxy1'))
  • 16. Limitations ● Locality Anomalies ○ Complicates Proximity Searches ○ Need to use bounding box extensively making search an expensive operation ● Projection based model ○ A geohash of given length will denote different region size in poles than in equator region
  • 18. Conclusions ● Simple and effective system to map complex lat-long coordinates into simple string representations ● Useful in applications where "nearness" of POIs is more relevant than accurate distance computation ● Enables quick db access using LIKE using grouping of prefixes of geohashes