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
 
Locate your hacks
Locate your hacksLocate your hacks
Locate your hacks
 

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

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

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/