Successfully reported this slideshow.
Geocoding the World 
(in Perl) 
Alex Balhatchet @ YAPC::EU 2014, София България
What is Geocoding?
What is Geocoding? 
147 
Tsarigradsko 
shose blvd 
1784 
Sofia 
Bulgaria 
Geocoder 
42.649996 
23.394527
Geocoding at 
Nestoria
Geocoding at Nestoria 
Property 
Listing 
(XML) 
Geocoder 
(Perl!) 
Results 
(Percona)
UK - so beautiful... 
<location> 
<full_address>Wold View, Caistor LN7</full_address> 
<postcode>LN7 6UU</postcode> 
<lati...
UK Postcodes are insane 
<postcode>LN7 6UU</postcode>
Germany - still quite good 
<geo> 
<strasse>Fischbeker Weg 12</strasse> 
<ort>Bargteheide</ort> 
<bundesland>Schleswig-Hol...
France - surprisingly bad data 
<location> 
<postcode>47000</postcode> 
<placenames> 
<town></town> 
<region>Aquitaine</re...
India - nightmare mode unlocked 
<location> 
<full_address>Hiland Landmark,Jangamakote, Vijayapura, Devanahalli, Bangalore...
India - nightmare mode unlocked
The Solution 
The Nestoria Geocoder
Geodata 
+ our own “amendments”
Nestoria Geocoder Internals
Nestoria Geocoder Internals
Nestoria Geocoder Internals
Nestoria Geocoder Internals
Nestoria Geocoder Internals
Nestoria Geocoder Internals
Nestoria Geocoder Internals
Nestoria Geocoder Internals
Nestoria Geocoder Internals
Nestoria Geocoder Internals
External Geocoders 
■ https://metacpan.org/search?q=Geo::Coder 
■ Lots available! 
■ Mostly very low daily usage limits (1...
The Bad News
The Good News
OpenCage Geocoder API 
■ http://geocoder.opencagedata.com/ 
■ Geo::Coder::OpenCage 
■ Currently free 
■ Will always have a...
OpenCage Geocoder API 
■ It’s new! 
■ Please try it out and give us your feedback 
■ @opencagedata 
■ geocoder.opencagedat...
Thanks / Questions
Geocoding the World in Perl YAPC::EU 2014
Geocoding the World in Perl YAPC::EU 2014
Geocoding the World in Perl YAPC::EU 2014
Geocoding the World in Perl YAPC::EU 2014
Upcoming SlideShare
Loading in …5
×

Geocoding the World in Perl YAPC::EU 2014

1,136 views

Published on

Yet another introduction to the challenges of geocoding and the ways we approach those problems at Lokku/Nestoria. I describe the details of how we tackle geocoding in countries like India, and also plug our the new OpenCage Data Geocoder API.

Published in: Software
  • Be the first to comment

Geocoding the World in Perl YAPC::EU 2014

  1. 1. Geocoding the World (in Perl) Alex Balhatchet @ YAPC::EU 2014, София България
  2. 2. What is Geocoding?
  3. 3. What is Geocoding? 147 Tsarigradsko shose blvd 1784 Sofia Bulgaria Geocoder 42.649996 23.394527
  4. 4. Geocoding at Nestoria
  5. 5. Geocoding at Nestoria Property Listing (XML) Geocoder (Perl!) Results (Percona)
  6. 6. UK - so beautiful... <location> <full_address>Wold View, Caistor LN7</full_address> <postcode>LN7 6UU</postcode> <latitude>53.496356</latitude> <longitude>-0.312442</longitude> <coordinate_system>WGS84</coordinate_system> <coordinate_confidence unit="gmaps">5</coordinate_confidence> <placenames> <street number="4">Wold View</street> <town>Caistor, Market Rasen</town> </placenames> </location>
  7. 7. UK Postcodes are insane <postcode>LN7 6UU</postcode>
  8. 8. Germany - still quite good <geo> <strasse>Fischbeker Weg 12</strasse> <ort>Bargteheide</ort> <bundesland>Schleswig-Holstein</bundesland> <plz>22941</plz> </geo>
  9. 9. France - surprisingly bad data <location> <postcode>47000</postcode> <placenames> <town></town> <region>Aquitaine</region> </placenames> </location>
  10. 10. India - nightmare mode unlocked <location> <full_address>Hiland Landmark,Jangamakote, Vijayapura, Devanahalli, Bangalore, Karnataka, INDIA.</full_address> <latitude>13.280192></latitude> <longitude>77.848219</longitude> <placenames> <building>Hiland Landmark</building> <area>Devanahalli</area> <town>Bangalore</town> <province>jangamakote</province> </placenames> </location>
  11. 11. India - nightmare mode unlocked
  12. 12. The Solution The Nestoria Geocoder
  13. 13. Geodata + our own “amendments”
  14. 14. Nestoria Geocoder Internals
  15. 15. Nestoria Geocoder Internals
  16. 16. Nestoria Geocoder Internals
  17. 17. Nestoria Geocoder Internals
  18. 18. Nestoria Geocoder Internals
  19. 19. Nestoria Geocoder Internals
  20. 20. Nestoria Geocoder Internals
  21. 21. Nestoria Geocoder Internals
  22. 22. Nestoria Geocoder Internals
  23. 23. Nestoria Geocoder Internals
  24. 24. External Geocoders ■ https://metacpan.org/search?q=Geo::Coder ■ Lots available! ■ Mostly very low daily usage limits (1000s per day) ■ We wrote Geo::Coder::Many to help multiplex between them within usage limits
  25. 25. The Bad News
  26. 26. The Good News
  27. 27. OpenCage Geocoder API ■ http://geocoder.opencagedata.com/ ■ Geo::Coder::OpenCage ■ Currently free ■ Will always have a free tier
  28. 28. OpenCage Geocoder API ■ It’s new! ■ Please try it out and give us your feedback ■ @opencagedata ■ geocoder.opencagedata.com/contact.html
  29. 29. Thanks / Questions

×