SlideShare a Scribd company logo
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},  "\n"; print "Longitude: ",  $result->{longitude},  "\n"; print "Latitude: ",  $result->{latitude},  "\n"; print "Location: ",  $result->{location},  "\n"; print "Response code: ", $result->{response_code}, "\n"; print "Address: ",  $result->{address},  "\n"; print "Precision: ",  $result->{precision},  "\n"; print "Geocoder: ",  $result->{geocoder},  "\n"; } else {  print "Failed to geocode!\n"; }
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 Add support for  Geo::Coder::GoogleV3 (underway as we speak) Navteq, Cloudmade, TomTom OpenSpace, country specific services? More feedback Move to github More tests 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

PPT
I18n with PHP 5.3
ZendCon
 
PPTX
Geocoding for beginners
Akansha Mishra
 
PDF
Referrel Agent introduction
Tint Works Inc
 
PDF
Mapstraction
lokku
 
PPTX
Presentacion ciencia y tecnologia
benigno rodriguez
 
PPTX
Laura
leonorny4
 
PPTX
Jobs in bihar
lucy grey
 
PPT
GréCia Antiga
Sílvia Mendonça
 
I18n with PHP 5.3
ZendCon
 
Geocoding for beginners
Akansha Mishra
 
Referrel Agent introduction
Tint Works Inc
 
Mapstraction
lokku
 
Presentacion ciencia y tecnologia
benigno rodriguez
 
Laura
leonorny4
 
Jobs in bihar
lucy grey
 
GréCia Antiga
Sílvia Mendonça
 

Viewers also liked (16)

PPT
GréCia
Sílvia Mendonça
 
PPTX
Using our class blog in literacy
KellyJordan
 
PPTX
Дорожня карта успішної адвокасі кампанії
Centre Eidos
 
PPT
Geocoding in Geographic Information Systems
Tanner Jessel
 
PDF
Empowering patients by ana-maria marian - ebbf international event #building ...
ebbf - mindful people, meaningful work
 
PPTX
FS S3
Dulce Sotil
 
PPTX
Building SaaS Enabled Applications
Movate
 
PDF
World Robot Olympiad 2017
Alberto Bernabeu
 
PPT
Kyiv Smart City: e-democracy
Centre Eidos
 
PDF
Evolution of the mummy
Vishal Dhariwal
 
PPSX
Company profile pti
Pasifik Teknologi Indonesia
 
PPT
U6 Interchange 3
c.meza
 
PPT
Unit 3 L4 N.I.3
Jose Maria Jaramillo Salazar
 
PPT
Unit 15 N.I. Would You Like To Leave A Message
Jose Maria Jaramillo Salazar
 
PPT
Jogos Olímpicos
becrejovim
 
PDF
Referencia css
Robert Rodriguez
 
Using our class blog in literacy
KellyJordan
 
Дорожня карта успішної адвокасі кампанії
Centre Eidos
 
Geocoding in Geographic Information Systems
Tanner Jessel
 
Empowering patients by ana-maria marian - ebbf international event #building ...
ebbf - mindful people, meaningful work
 
Building SaaS Enabled Applications
Movate
 
World Robot Olympiad 2017
Alberto Bernabeu
 
Kyiv Smart City: e-democracy
Centre Eidos
 
Evolution of the mummy
Vishal Dhariwal
 
Company profile pti
Pasifik Teknologi Indonesia
 
U6 Interchange 3
c.meza
 
Unit 15 N.I. Would You Like To Leave A Message
Jose Maria Jaramillo Salazar
 
Jogos Olímpicos
becrejovim
 
Referencia css
Robert Rodriguez
 
Ad

Similar to Remote Geocoding (18)

PDF
Rails GIS Hacks
Satish lal Acharya
 
PDF
Geokit In Social Apps
Paul Jensen
 
PDF
Where20 2008 Ruby Tutorial
Shoaib Burq
 
PDF
The OpenCage Geocoder #lpw2014
Ed Freyfogle
 
PDF
Rails Gis Hacks
Shoaib Burq
 
PDF
Geolocation on Rails
nebirhos
 
PPT
Geolocation in Drupal
Mediacurrent
 
PPTX
Geopy Module in Python
RabinaTwayana
 
PDF
GeoCommons Open-Source GeoCoder
Andrew Turner
 
PPTX
Python Geopy
Biplov Bhandari
 
PDF
Geo search introduction
kenshin03
 
KEY
OSCON july 2011
chelm
 
PDF
Mapping in Drupal 7 using OpenLayers
Peter Vanhee
 
PPTX
Where in the world
Marcus Deglos
 
PDF
Geographic Computation in Perl
Ian Kluft
 
PPTX
Geolocation
Timothy Boronczyk
 
PPTX
Enhance Location-Based Insights with Additional Geocoding Capabilities
Precisely
 
PDF
Aerospace applications of Perl
Ian Kluft
 
Rails GIS Hacks
Satish lal Acharya
 
Geokit In Social Apps
Paul Jensen
 
Where20 2008 Ruby Tutorial
Shoaib Burq
 
The OpenCage Geocoder #lpw2014
Ed Freyfogle
 
Rails Gis Hacks
Shoaib Burq
 
Geolocation on Rails
nebirhos
 
Geolocation in Drupal
Mediacurrent
 
Geopy Module in Python
RabinaTwayana
 
GeoCommons Open-Source GeoCoder
Andrew Turner
 
Python Geopy
Biplov Bhandari
 
Geo search introduction
kenshin03
 
OSCON july 2011
chelm
 
Mapping in Drupal 7 using OpenLayers
Peter Vanhee
 
Where in the world
Marcus Deglos
 
Geographic Computation in Perl
Ian Kluft
 
Geolocation
Timothy Boronczyk
 
Enhance Location-Based Insights with Additional Geocoding Capabilities
Precisely
 
Aerospace applications of Perl
Ian Kluft
 
Ad

More from lokku (20)

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

Recently uploaded (20)

PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Software Development Methodologies in 2025
KodekX
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Software Development Methodologies in 2025
KodekX
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 

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}, "\n"; print "Longitude: ", $result->{longitude}, "\n"; print "Latitude: ", $result->{latitude}, "\n"; print "Location: ", $result->{location}, "\n"; print "Response code: ", $result->{response_code}, "\n"; print "Address: ", $result->{address}, "\n"; print "Precision: ", $result->{precision}, "\n"; print "Geocoder: ", $result->{geocoder}, "\n"; } else { print "Failed to geocode!\n"; }
  • 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. We need YOUR help Add support for Geo::Coder::GoogleV3 (underway as we speak) Navteq, Cloudmade, TomTom OpenSpace, country specific services? More feedback Move to github More tests http://www.flickr.com/photos/revcyborg
  • 13. You may also enjoy: Subscribing to [email protected]
  • 14. Thanks! About Nestoria blog.nestoria.co.uk @nestoria About me @freyfogle We’re hiring: http://www.lokku.com/jobs/