SlideShare a Scribd company logo
Geohash
{lat/lon → string}
Python Developer Nepal Meetup #6
March 19, 2015
Who am I?
Narayan Kandel
Developer at nLocate (Python/Django)
Previously Java Developer at Deerwalk
What I Will Cover
1. Our requirements
2. What is a geohash?
3. How does it work?
4. How we use it?
Our Requirement
● Analyze visitor from different location
○ different data
1. business data
2. user generated log
● Duplication Check
What is Geohashing
Simple way to encode lat/lng into a string
Compact string encoding of geographic coordinate with
arbitrary precision
Kathmandu - tuut, Chitwan - tuuj
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 lat/lon
Big address of venue
ABC road
Lalitpur Sub-Municipality -12, Kupondole
Lalitpur, Bagmati
Nepal
Complicated Lat/Long
{27.6830282799,85.3180309269}
● 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
snap taken from geohash.gofreerange.com
How does it work?
How does it work?
Mapping
5 bits (25
) = 32 alpha-numeric
1-9 b-z except a, i, l, o
*http://en.wikipedia.org/wiki/Geohash
How does it work?...
demo
snap taken from geohash.gofreerange.com
Lets come to our problem
● Analyze visitor from different location
Method 1:
Polygon
Analyze visitor from different location ...
Method 2
Geohashing
Prefix Matching
Other Area Where we used it
● To find duplicate Spot - O(n2
)
Other Application
● twitter - location based tweet count/find trend on particular location
● flickr/instagram - find location based photo with area selection on
number of prefix
● alerter system at telecommunication (integration of hardware
location + customer complain location)
● and many more...
References
● Geohash - http://en.wikipedia.org/wiki/Geohash
Thank You
twitter: @dearnarayan
email: narayan@nlocate.com

More Related Content

Similar to Geohash

Similar to Geohash (10)

Geospatial Options in Apache Spark
Geospatial Options in Apache SparkGeospatial Options in Apache Spark
Geospatial Options in Apache Spark
 
Using python to analyze spatial data
Using python to analyze spatial dataUsing python to analyze spatial data
Using python to analyze spatial data
 
Python's slippy path and Tao of thick Pandas: give my data, Rrrrr...
Python's slippy path and Tao of thick Pandas: give my data, Rrrrr...Python's slippy path and Tao of thick Pandas: give my data, Rrrrr...
Python's slippy path and Tao of thick Pandas: give my data, Rrrrr...
 
Powerful geographic web framework GeoDjango
Powerful geographic web framework GeoDjangoPowerful geographic web framework GeoDjango
Powerful geographic web framework GeoDjango
 
Presenting OpenStreetMap in Ghana during Project Flood Risk Accra Workshop
Presenting OpenStreetMap in Ghana during Project Flood Risk Accra WorkshopPresenting OpenStreetMap in Ghana during Project Flood Risk Accra Workshop
Presenting OpenStreetMap in Ghana during Project Flood Risk Accra Workshop
 
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
 
OpenStreetMap in Ghana @ SFD 2015
OpenStreetMap in Ghana @ SFD 2015OpenStreetMap in Ghana @ SFD 2015
OpenStreetMap in Ghana @ SFD 2015
 
Exploratory Data Analysis in Spark
Exploratory Data Analysis in SparkExploratory Data Analysis in Spark
Exploratory Data Analysis in Spark
 
IPv6 on Mikrotik
IPv6 on MikrotikIPv6 on Mikrotik
IPv6 on Mikrotik
 
GeoNode intro and demo
GeoNode intro and demoGeoNode intro and demo
GeoNode intro and demo
 

Recently uploaded

Recently uploaded (20)

Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 

Geohash

  • 1. Geohash {lat/lon → string} Python Developer Nepal Meetup #6 March 19, 2015
  • 2. Who am I? Narayan Kandel Developer at nLocate (Python/Django) Previously Java Developer at Deerwalk
  • 3. What I Will Cover 1. Our requirements 2. What is a geohash? 3. How does it work? 4. How we use it?
  • 4. Our Requirement ● Analyze visitor from different location ○ different data 1. business data 2. user generated log ● Duplication Check
  • 5. What is Geohashing Simple way to encode lat/lng into a string Compact string encoding of geographic coordinate with arbitrary precision Kathmandu - tuut, Chitwan - tuuj Invented by Gustavo Niemeyer for geohash.org Available in public domain http://en.wikipedia.org/wiki/geohash/
  • 6. Why do we need it when we have lat/lon Big address of venue ABC road Lalitpur Sub-Municipality -12, Kupondole Lalitpur, Bagmati Nepal Complicated Lat/Long {27.6830282799,85.3180309269}
  • 7. ● 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 snap taken from geohash.gofreerange.com
  • 8. How does it work?
  • 9. How does it work?
  • 10. Mapping 5 bits (25 ) = 32 alpha-numeric 1-9 b-z except a, i, l, o *http://en.wikipedia.org/wiki/Geohash
  • 11. How does it work?... demo snap taken from geohash.gofreerange.com
  • 12. Lets come to our problem ● Analyze visitor from different location Method 1: Polygon
  • 13. Analyze visitor from different location ... Method 2 Geohashing Prefix Matching
  • 14. Other Area Where we used it ● To find duplicate Spot - O(n2 )
  • 15. Other Application ● twitter - location based tweet count/find trend on particular location ● flickr/instagram - find location based photo with area selection on number of prefix ● alerter system at telecommunication (integration of hardware location + customer complain location) ● and many more...
  • 16. References ● Geohash - http://en.wikipedia.org/wiki/Geohash