SlideShare a Scribd company logo
1 of 15
Remote Geocoding Ed Freyfogle London Perl Workshop, 4 Dec 2010
What is geocoding? Geocoding is the process of finding associated geographic coordinates (often expressed as latitude and longitude) from other geographic data, such as street addresses, or zip codes (postal codes) See also: http://www.lokku.com/lpw06_geocoding/
remote geocoding? http://www.flickr.com/photos/jennratonmort Magical internet elves try to answer your every  geocoding whim across the miracle of HTTP
The problem: many remote geocoders Geo::Coder::Google Geo::Coder::Yahoo Geo::Coder::Placefinder Geo::Coder::Mapquest Geo::Cloudmade Geo::Coder::Bing Geo::Coder::OSM Geo::Coder::SimpleGeo And more …
the small print registration, keys rate limits usage limits http://www.flickr.com/photos/mrwilleeumm
But different … quality  query formats response formats concepts of precision version changes http://www.flickr.com/photos/goldberg
Geo::Coder::Many One interface Single precision definition Intelligent caching and failover Easily set picker and filter methods, with common use cases predefined http://www.flickr.com/photos/vermininc
And now for some code http://www.flickr.com/photos/vermininc use Geo::Coder::Locatorize; use Geo::Coder::WhereIzIt; use Geo::Coder::Many; use Geo::Coder::Many::Util qw( country_filter ); # Create the Geo::Coder::Many object # using a 'weighted round robin' # scheduling method my $options = { cache  => $cache_object, scheduler_type => 'WRR', }; my $geocoder_many = Geo::Coder::Many->new( $options );
…  continued http://www.flickr.com/photos/vermininc # Create and add a geocoder my $Locatorize = Geo::Coder::Locatorize->new( appid => 'mY_loCat0r1Ze_iD' ); my $Locatorize_options = { geocoder  => $Locatorize, daily_limit => 2500, }; $geocoder_many->add_geocoder( $Locatorize_options ); # Create and add a second geocoder my $WhereIzIt = Geo::Coder::WhereIzIt->new( apikey => 'mY_WhERiz1t_kEy' ); my $WhereIzIt_options = { geocoder  => $WhereIzIt, daily_limit => 4000, }; $geocoder_many->add_geocoder( $WhereIzIt_options ); # Use a filter callback from Geo::Coder::Many::Util # we only want results from the UK # fuck you London, Ontario! $geocoder_many->set_filter_callback(country_filter('United Kingdom')); # Use a built-in picker callback $geocoder_many->set_picker_callback('max_precision');
Let’s do this thing http://www.flickr.com/photos/vermininc my $result = $geocoder_many->geocode({ location => 'London NW1 5LS'  });  if (defined $result) { print "Country: ",  $result->{country},  ""; print "Longitude: ",  $result->{longitude},  ""; print "Latitude: ",  $result->{latitude},  ""; print "Location: ",  $result->{location},  ""; print "Response code: ", $result->{response_code}, ""; print "Address: ",  $result->{address},  ""; print "Precision: ",  $result->{precision},  ""; print "Geocoder: ",  $result->{geocoder},  ""; } else {  print "Failed to geocode!"; }
Possible response codes http://www.flickr.com/photos/vermininc 200  Success  210  Success (from cache) 401  Unable to find location 402  All geocoder limits reached
We need YOUR help ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],http://www.flickr.com/photos/revcyborg
You may also enjoy: Subscribing to geocoding@openstreetmap.org
Thanks! About Nestoria blog.nestoria.co.uk @nestoria About me @freyfogle We’re hiring: http://www.lokku.com/jobs/
Questions? http://www.flickr.com/photos/calavera/65098350/

More Related Content

Viewers also liked

Using our class blog in literacy
Using our class blog in literacyUsing our class blog in literacy
Using our class blog in literacyKellyJordan
 
Дорожня карта успішної адвокасі кампанії
Дорожня карта успішної адвокасі кампаніїДорожня карта успішної адвокасі кампанії
Дорожня карта успішної адвокасі кампаніїCentre Eidos
 
Geocoding in Geographic Information Systems
Geocoding in Geographic Information SystemsGeocoding in Geographic Information Systems
Geocoding in Geographic Information SystemsTanner Jessel
 
Empowering patients by ana-maria marian - ebbf international event #building ...
Empowering patients by ana-maria marian - ebbf international event #building ...Empowering patients by ana-maria marian - ebbf international event #building ...
Empowering patients by ana-maria marian - ebbf international event #building ...ebbf - mindful people, meaningful work
 
Building SaaS Enabled Applications
Building SaaS Enabled ApplicationsBuilding SaaS Enabled Applications
Building SaaS Enabled ApplicationsMovate
 
Kyiv Smart City: e-democracy
Kyiv Smart City: e-democracyKyiv Smart City: e-democracy
Kyiv Smart City: e-democracyCentre Eidos
 
U6 Interchange 3
U6 Interchange 3U6 Interchange 3
U6 Interchange 3c.meza
 
Jogos Olímpicos
Jogos OlímpicosJogos Olímpicos
Jogos Olímpicosbecrejovim
 

Viewers also liked (16)

GréCia
GréCiaGréCia
GréCia
 
Using our class blog in literacy
Using our class blog in literacyUsing our class blog in literacy
Using our class blog in literacy
 
Дорожня карта успішної адвокасі кампанії
Дорожня карта успішної адвокасі кампаніїДорожня карта успішної адвокасі кампанії
Дорожня карта успішної адвокасі кампанії
 
Geocoding in Geographic Information Systems
Geocoding in Geographic Information SystemsGeocoding in Geographic Information Systems
Geocoding in Geographic Information Systems
 
Empowering patients by ana-maria marian - ebbf international event #building ...
Empowering patients by ana-maria marian - ebbf international event #building ...Empowering patients by ana-maria marian - ebbf international event #building ...
Empowering patients by ana-maria marian - ebbf international event #building ...
 
FS S3
FS S3FS S3
FS S3
 
Building SaaS Enabled Applications
Building SaaS Enabled ApplicationsBuilding SaaS Enabled Applications
Building SaaS Enabled Applications
 
World Robot Olympiad 2017
World Robot Olympiad 2017World Robot Olympiad 2017
World Robot Olympiad 2017
 
Kyiv Smart City: e-democracy
Kyiv Smart City: e-democracyKyiv Smart City: e-democracy
Kyiv Smart City: e-democracy
 
Evolution of the mummy
Evolution of the mummyEvolution of the mummy
Evolution of the mummy
 
Company profile pti
Company profile   ptiCompany profile   pti
Company profile pti
 
U6 Interchange 3
U6 Interchange 3U6 Interchange 3
U6 Interchange 3
 
Unit 3 L4 N.I.3
Unit 3 L4 N.I.3Unit 3 L4 N.I.3
Unit 3 L4 N.I.3
 
Unit 15 N.I. Would You Like To Leave A Message
Unit 15 N.I. Would You Like To Leave A MessageUnit 15 N.I. Would You Like To Leave A Message
Unit 15 N.I. Would You Like To Leave A Message
 
Jogos Olímpicos
Jogos OlímpicosJogos Olímpicos
Jogos Olímpicos
 
Referencia css
Referencia cssReferencia css
Referencia css
 

Similar to Remote Geocoding

Interview with Developer Jose Luis Arenas regarding Google App Engine & Geosp...
Interview with Developer Jose Luis Arenas regarding Google App Engine & Geosp...Interview with Developer Jose Luis Arenas regarding Google App Engine & Geosp...
Interview with Developer Jose Luis Arenas regarding Google App Engine & Geosp...Rif Kiamil
 
Geopy Module in Python
Geopy Module in PythonGeopy Module in Python
Geopy Module in PythonRabinaTwayana
 
Geolocation on Rails
Geolocation on RailsGeolocation on Rails
Geolocation on Railsnebirhos
 
Geokit In Social Apps
Geokit In Social AppsGeokit In Social Apps
Geokit In Social AppsPaul Jensen
 
OSCON july 2011
OSCON july 2011OSCON july 2011
OSCON july 2011chelm
 
Android location services from social networks to games
Android location services from social networks to gamesAndroid location services from social networks to games
Android location services from social networks to gamesDon Park
 
Data Mining Open Ap Is
Data Mining Open Ap IsData Mining Open Ap Is
Data Mining Open Ap Isoscon2007
 
Cross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineCross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineAndy McKay
 
Gmaps Railscamp2008
Gmaps Railscamp2008Gmaps Railscamp2008
Gmaps Railscamp2008xilinus
 
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptxLecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptxNgLQun
 
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013Aaron Parecki
 
Using YQL Sensibly - YUIConf 2010
Using YQL Sensibly - YUIConf 2010Using YQL Sensibly - YUIConf 2010
Using YQL Sensibly - YUIConf 2010Christian Heilmann
 
How to build SDKs in Go
How to build SDKs in GoHow to build SDKs in Go
How to build SDKs in GoDiwaker Gupta
 
PhoneGap_Javakuche0612
PhoneGap_Javakuche0612PhoneGap_Javakuche0612
PhoneGap_Javakuche0612Yuhei Miyazato
 

Similar to Remote Geocoding (20)

Interview with Developer Jose Luis Arenas regarding Google App Engine & Geosp...
Interview with Developer Jose Luis Arenas regarding Google App Engine & Geosp...Interview with Developer Jose Luis Arenas regarding Google App Engine & Geosp...
Interview with Developer Jose Luis Arenas regarding Google App Engine & Geosp...
 
Geopy Module in Python
Geopy Module in PythonGeopy Module in Python
Geopy Module in Python
 
Geolocation on Rails
Geolocation on RailsGeolocation on Rails
Geolocation on Rails
 
Geokit In Social Apps
Geokit In Social AppsGeokit In Social Apps
Geokit In Social Apps
 
OSCON july 2011
OSCON july 2011OSCON july 2011
OSCON july 2011
 
Rails Gis Hacks
Rails Gis HacksRails Gis Hacks
Rails Gis Hacks
 
Android location services from social networks to games
Android location services from social networks to gamesAndroid location services from social networks to games
Android location services from social networks to games
 
Data Mining Open Ap Is
Data Mining Open Ap IsData Mining Open Ap Is
Data Mining Open Ap Is
 
dojo.Patterns
dojo.Patternsdojo.Patterns
dojo.Patterns
 
Cross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineCross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App Engine
 
Gmaps Railscamp2008
Gmaps Railscamp2008Gmaps Railscamp2008
Gmaps Railscamp2008
 
Scripting GeoServer
Scripting GeoServerScripting GeoServer
Scripting GeoServer
 
Trimming The Cruft
Trimming The CruftTrimming The Cruft
Trimming The Cruft
 
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptxLecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
 
Rails GIS Hacks
Rails GIS HacksRails GIS Hacks
Rails GIS Hacks
 
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
 
Using YQL Sensibly - YUIConf 2010
Using YQL Sensibly - YUIConf 2010Using YQL Sensibly - YUIConf 2010
Using YQL Sensibly - YUIConf 2010
 
How to build SDKs in Go
How to build SDKs in GoHow to build SDKs in Go
How to build SDKs in Go
 
PhoneGap_Javakuche0612
PhoneGap_Javakuche0612PhoneGap_Javakuche0612
PhoneGap_Javakuche0612
 
Hacking location aware hacks HackU IIT Bombay
Hacking location aware hacks HackU IIT BombayHacking location aware hacks HackU IIT Bombay
Hacking location aware hacks HackU IIT Bombay
 

More from lokku

Geocoding Overview
Geocoding OverviewGeocoding Overview
Geocoding Overviewlokku
 
OpenCage Data and sustainable business models for open data
OpenCage Data and sustainable business models for open data OpenCage Data and sustainable business models for open data
OpenCage Data and sustainable business models for open data lokku
 
Presenting the OpenCage Geocoder at #londonapi 17 Sept 2014
Presenting the OpenCage Geocoder at #londonapi 17 Sept 2014Presenting the OpenCage Geocoder at #londonapi 17 Sept 2014
Presenting the OpenCage Geocoder at #londonapi 17 Sept 2014lokku
 
A living hell - lessons learned in eight years of parsing real estate data
A living hell - lessons learned in eight years of parsing real estate data  A living hell - lessons learned in eight years of parsing real estate data
A living hell - lessons learned in eight years of parsing real estate data lokku
 
Geo-search-location-based-results-for-site-search
Geo-search-location-based-results-for-site-searchGeo-search-location-based-results-for-site-search
Geo-search-location-based-results-for-site-searchlokku
 
Geocoding India - talk delivered on 31 Jan 2014 at the Bangalore goeBLR event
Geocoding India - talk delivered on 31 Jan 2014 at the Bangalore goeBLR eventGeocoding India - talk delivered on 31 Jan 2014 at the Bangalore goeBLR event
Geocoding India - talk delivered on 31 Jan 2014 at the Bangalore goeBLR eventlokku
 
Nestoria new design
Nestoria new designNestoria new design
Nestoria new designlokku
 
CSS::SpriteMaker in action!
CSS::SpriteMaker in action!CSS::SpriteMaker in action!
CSS::SpriteMaker in action!lokku
 
Reducing the technical hurdle - why we started OpenCage Data
Reducing the technical hurdle - why we started OpenCage DataReducing the technical hurdle - why we started OpenCage Data
Reducing the technical hurdle - why we started OpenCage Datalokku
 
Css sprite_maker-1
Css  sprite_maker-1Css  sprite_maker-1
Css sprite_maker-1lokku
 
Nestoria case study - The effective use of geo-data for search marketing
Nestoria case study - The effective use of geo-data for search marketingNestoria case study - The effective use of geo-data for search marketing
Nestoria case study - The effective use of geo-data for search marketinglokku
 
The Nestoria GeoChallenge
The Nestoria GeoChallengeThe Nestoria GeoChallenge
The Nestoria GeoChallengelokku
 
Geo-Data for Search Marketing SEM & SEO
Geo-Data for Search Marketing SEM & SEOGeo-Data for Search Marketing SEM & SEO
Geo-Data for Search Marketing SEM & SEOlokku
 
Making using OSM data simpler - OpenCage Data
Making using OSM data simpler - OpenCage Data Making using OSM data simpler - OpenCage Data
Making using OSM data simpler - OpenCage Data lokku
 
What’s next in mapping for portals? ppw2012
What’s next in mapping for portals? ppw2012What’s next in mapping for portals? ppw2012
What’s next in mapping for portals? ppw2012lokku
 
How Nestoria switched to OpenStreetMap maps
How Nestoria switched to OpenStreetMap mapsHow Nestoria switched to OpenStreetMap maps
How Nestoria switched to OpenStreetMap mapslokku
 
Lessons learned in doing lots with few people
Lessons learned in  doing lots with few peopleLessons learned in  doing lots with few people
Lessons learned in doing lots with few peoplelokku
 
Bar Camp London 7
Bar Camp London 7Bar Camp London 7
Bar Camp London 7lokku
 
The path ahead for property portals
The path ahead for property portalsThe path ahead for property portals
The path ahead for property portalslokku
 
How People Search For Locations
How People Search For LocationsHow People Search For Locations
How People Search For Locationslokku
 

More from lokku (20)

Geocoding Overview
Geocoding OverviewGeocoding Overview
Geocoding Overview
 
OpenCage Data and sustainable business models for open data
OpenCage Data and sustainable business models for open data OpenCage Data and sustainable business models for open data
OpenCage Data and sustainable business models for open data
 
Presenting the OpenCage Geocoder at #londonapi 17 Sept 2014
Presenting the OpenCage Geocoder at #londonapi 17 Sept 2014Presenting the OpenCage Geocoder at #londonapi 17 Sept 2014
Presenting the OpenCage Geocoder at #londonapi 17 Sept 2014
 
A living hell - lessons learned in eight years of parsing real estate data
A living hell - lessons learned in eight years of parsing real estate data  A living hell - lessons learned in eight years of parsing real estate data
A living hell - lessons learned in eight years of parsing real estate data
 
Geo-search-location-based-results-for-site-search
Geo-search-location-based-results-for-site-searchGeo-search-location-based-results-for-site-search
Geo-search-location-based-results-for-site-search
 
Geocoding India - talk delivered on 31 Jan 2014 at the Bangalore goeBLR event
Geocoding India - talk delivered on 31 Jan 2014 at the Bangalore goeBLR eventGeocoding India - talk delivered on 31 Jan 2014 at the Bangalore goeBLR event
Geocoding India - talk delivered on 31 Jan 2014 at the Bangalore goeBLR event
 
Nestoria new design
Nestoria new designNestoria new design
Nestoria new design
 
CSS::SpriteMaker in action!
CSS::SpriteMaker in action!CSS::SpriteMaker in action!
CSS::SpriteMaker in action!
 
Reducing the technical hurdle - why we started OpenCage Data
Reducing the technical hurdle - why we started OpenCage DataReducing the technical hurdle - why we started OpenCage Data
Reducing the technical hurdle - why we started OpenCage Data
 
Css sprite_maker-1
Css  sprite_maker-1Css  sprite_maker-1
Css sprite_maker-1
 
Nestoria case study - The effective use of geo-data for search marketing
Nestoria case study - The effective use of geo-data for search marketingNestoria case study - The effective use of geo-data for search marketing
Nestoria case study - The effective use of geo-data for search marketing
 
The Nestoria GeoChallenge
The Nestoria GeoChallengeThe Nestoria GeoChallenge
The Nestoria GeoChallenge
 
Geo-Data for Search Marketing SEM & SEO
Geo-Data for Search Marketing SEM & SEOGeo-Data for Search Marketing SEM & SEO
Geo-Data for Search Marketing SEM & SEO
 
Making using OSM data simpler - OpenCage Data
Making using OSM data simpler - OpenCage Data Making using OSM data simpler - OpenCage Data
Making using OSM data simpler - OpenCage Data
 
What’s next in mapping for portals? ppw2012
What’s next in mapping for portals? ppw2012What’s next in mapping for portals? ppw2012
What’s next in mapping for portals? ppw2012
 
How Nestoria switched to OpenStreetMap maps
How Nestoria switched to OpenStreetMap mapsHow Nestoria switched to OpenStreetMap maps
How Nestoria switched to OpenStreetMap maps
 
Lessons learned in doing lots with few people
Lessons learned in  doing lots with few peopleLessons learned in  doing lots with few people
Lessons learned in doing lots with few people
 
Bar Camp London 7
Bar Camp London 7Bar Camp London 7
Bar Camp London 7
 
The path ahead for property portals
The path ahead for property portalsThe path ahead for property portals
The path ahead for property portals
 
How People Search For Locations
How People Search For LocationsHow People Search For Locations
How People Search For Locations
 

Recently uploaded

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 

Recently uploaded (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 

Remote Geocoding

  • 1. Remote Geocoding Ed Freyfogle London Perl Workshop, 4 Dec 2010
  • 2. What is geocoding? Geocoding is the process of finding associated geographic coordinates (often expressed as latitude and longitude) from other geographic data, such as street addresses, or zip codes (postal codes) See also: http://www.lokku.com/lpw06_geocoding/
  • 3. remote geocoding? http://www.flickr.com/photos/jennratonmort Magical internet elves try to answer your every geocoding whim across the miracle of HTTP
  • 4. The problem: many remote geocoders Geo::Coder::Google Geo::Coder::Yahoo Geo::Coder::Placefinder Geo::Coder::Mapquest Geo::Cloudmade Geo::Coder::Bing Geo::Coder::OSM Geo::Coder::SimpleGeo And more …
  • 5. the small print registration, keys rate limits usage limits http://www.flickr.com/photos/mrwilleeumm
  • 6. But different … quality query formats response formats concepts of precision version changes http://www.flickr.com/photos/goldberg
  • 7. Geo::Coder::Many One interface Single precision definition Intelligent caching and failover Easily set picker and filter methods, with common use cases predefined http://www.flickr.com/photos/vermininc
  • 8. And now for some code http://www.flickr.com/photos/vermininc use Geo::Coder::Locatorize; use Geo::Coder::WhereIzIt; use Geo::Coder::Many; use Geo::Coder::Many::Util qw( country_filter ); # Create the Geo::Coder::Many object # using a 'weighted round robin' # scheduling method my $options = { cache => $cache_object, scheduler_type => 'WRR', }; my $geocoder_many = Geo::Coder::Many->new( $options );
  • 9. … continued http://www.flickr.com/photos/vermininc # Create and add a geocoder my $Locatorize = Geo::Coder::Locatorize->new( appid => 'mY_loCat0r1Ze_iD' ); my $Locatorize_options = { geocoder => $Locatorize, daily_limit => 2500, }; $geocoder_many->add_geocoder( $Locatorize_options ); # Create and add a second geocoder my $WhereIzIt = Geo::Coder::WhereIzIt->new( apikey => 'mY_WhERiz1t_kEy' ); my $WhereIzIt_options = { geocoder => $WhereIzIt, daily_limit => 4000, }; $geocoder_many->add_geocoder( $WhereIzIt_options ); # Use a filter callback from Geo::Coder::Many::Util # we only want results from the UK # fuck you London, Ontario! $geocoder_many->set_filter_callback(country_filter('United Kingdom')); # Use a built-in picker callback $geocoder_many->set_picker_callback('max_precision');
  • 10. Let’s do this thing http://www.flickr.com/photos/vermininc my $result = $geocoder_many->geocode({ location => 'London NW1 5LS' }); if (defined $result) { print "Country: ", $result->{country}, ""; print "Longitude: ", $result->{longitude}, ""; print "Latitude: ", $result->{latitude}, ""; print "Location: ", $result->{location}, ""; print "Response code: ", $result->{response_code}, ""; print "Address: ", $result->{address}, ""; print "Precision: ", $result->{precision}, ""; print "Geocoder: ", $result->{geocoder}, ""; } else { print "Failed to geocode!"; }
  • 11. Possible response codes http://www.flickr.com/photos/vermininc 200 Success 210 Success (from cache) 401 Unable to find location 402 All geocoder limits reached
  • 12.
  • 13. You may also enjoy: Subscribing to geocoding@openstreetmap.org
  • 14. Thanks! About Nestoria blog.nestoria.co.uk @nestoria About me @freyfogle We’re hiring: http://www.lokku.com/jobs/