geocoding the world in perl yapc::eu 2014
DESCRIPTION
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.TRANSCRIPT
![Page 1: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/1.jpg)
Geocoding the World(in Perl)
Alex Balhatchet @ YAPC::EU 2014, София България
![Page 2: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/2.jpg)
![Page 3: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/3.jpg)
![Page 4: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/4.jpg)
![Page 5: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/5.jpg)
What is Geocoding?
![Page 6: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/6.jpg)
What is Geocoding?
147Tsarigradsko shose blvd1784SofiaBulgaria
Geocoder
42.649996
23.394527
![Page 7: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/7.jpg)
Geocoding at Nestoria
![Page 8: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/8.jpg)
Geocoding at Nestoria
Property Listing(XML)
Geocoder(Perl!)
Results(Percona)
![Page 9: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/9.jpg)
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>
![Page 10: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/10.jpg)
UK Postcodes are insane<postcode>LN7 6UU</postcode>
![Page 11: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/11.jpg)
Germany - still quite good
<geo>
<strasse>Fischbeker Weg 12</strasse>
<ort>Bargteheide</ort>
<bundesland>Schleswig-Holstein</bundesland>
<plz>22941</plz>
</geo>
![Page 12: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/12.jpg)
France - surprisingly bad data
<location>
<postcode>47000</postcode>
<placenames>
<town></town>
<region>Aquitaine</region>
</placenames>
</location>
![Page 13: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/13.jpg)
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>
![Page 14: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/14.jpg)
India - nightmare mode unlocked
![Page 15: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/15.jpg)
The SolutionThe Nestoria Geocoder
![Page 16: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/16.jpg)
Geodata
+ our own “amendments”
![Page 17: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/17.jpg)
Nestoria Geocoder Internals
![Page 18: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/18.jpg)
Nestoria Geocoder Internals
![Page 19: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/19.jpg)
Nestoria Geocoder Internals
![Page 20: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/20.jpg)
Nestoria Geocoder Internals
![Page 21: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/21.jpg)
Nestoria Geocoder Internals
![Page 22: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/22.jpg)
Nestoria Geocoder Internals
![Page 23: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/23.jpg)
Nestoria Geocoder Internals
![Page 24: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/24.jpg)
Nestoria Geocoder Internals
![Page 25: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/25.jpg)
Nestoria Geocoder Internals
![Page 26: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/26.jpg)
Nestoria Geocoder Internals
![Page 27: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/27.jpg)
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
![Page 28: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/28.jpg)
The Bad News
![Page 29: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/29.jpg)
![Page 30: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/30.jpg)
The Good News
![Page 31: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/31.jpg)
OpenCage Geocoder API
■ http://geocoder.opencagedata.com/
■ Geo::Coder::OpenCage
■ Currently free
■ Will always have a free tier
![Page 32: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/32.jpg)
OpenCage Geocoder API
■ It’s new!
■ Please try it out and give us your feedback
■ @opencagedata
■ geocoder.opencagedata.com/contact.html
![Page 33: Geocoding the World in Perl YAPC::EU 2014](https://reader034.vdocuments.site/reader034/viewer/2022051412/54b1d4d54a795933108b4591/html5/thumbnails/33.jpg)
Thanks / Questions