the opencage geocoder #lpw2014

42
A meta-geocoding API made in Perl Ed Freyfogle London Perl Workshop - 8 Nov. 2014 http://opencagedata.com @opencagedata

Upload: ed-freyfogle

Post on 09-Jul-2015

482 views

Category:

Internet


2 download

DESCRIPTION

The OpenCage Geocoder, a meta-geocoder written in Perl. As presented at the 2014 London Perl Workshop

TRANSCRIPT

Page 1: The OpenCage Geocoder #lpw2014

A meta-geocoding APImade in Perl

Ed FreyfogleLondon Perl Workshop - 8 Nov. 2014

http://opencagedata.com@opencagedata

Page 2: The OpenCage Geocoder #lpw2014

Problem

Page 3: The OpenCage Geocoder #lpw2014

Where are we?

Page 4: The OpenCage Geocoder #lpw2014

(c) OpenStreetMap contributors

Page 5: The OpenCage Geocoder #lpw2014

51.52089885, -0.14007993

Page 6: The OpenCage Geocoder #lpw2014
Page 7: The OpenCage Geocoder #lpw2014

London!

Page 8: The OpenCage Geocoder #lpw2014

London!

Fitzrovia!

Page 9: The OpenCage Geocoder #lpw2014

London!

Fizrovia!

W1W 6UW!

Page 10: The OpenCage Geocoder #lpw2014

London!Fitzrovia!

W1W 6UW!

near Goodge Street

England

New Cavendish Street

Zone 1University of Westminster

United Kingdom

just off TCR

Page 11: The OpenCage Geocoder #lpw2014
Page 12: The OpenCage Geocoder #lpw2014

placename long/lat

Page 13: The OpenCage Geocoder #lpw2014

placename long/lat

forward

Page 14: The OpenCage Geocoder #lpw2014

placename long/lat

forward

reverse

Page 15: The OpenCage Geocoder #lpw2014

Why?- put points on a map- show someone where they are in an app- fleet tracking- routing (A to B)

Page 16: The OpenCage Geocoder #lpw2014

Why?- put points on a map- show someone where they are in an app- fleet tracking- routing (A to B)

IoT - every object will know where it is

Page 17: The OpenCage Geocoder #lpw2014
Page 18: The OpenCage Geocoder #lpw2014

Yes!

Page 19: The OpenCage Geocoder #lpw2014

Yes! but …T&Csexpensive at volume

Page 20: The OpenCage Geocoder #lpw2014

OpenStreetMap

Page 21: The OpenCage Geocoder #lpw2014

Yes!

Page 22: The OpenCage Geocoder #lpw2014

Yes! but …not for high volume usevariable coverage

Page 23: The OpenCage Geocoder #lpw2014
Page 24: The OpenCage Geocoder #lpw2014

Yes!

Page 25: The OpenCage Geocoder #lpw2014

Yes! and …one API, many geocodersfree as in freedomannotations

Page 26: The OpenCage Geocoder #lpw2014

You Geonames

and more

Page 27: The OpenCage Geocoder #lpw2014

Open datause any map you like cache as long as you likefix itget creative

Page 28: The OpenCage Geocoder #lpw2014

Annotationstimezones OS gridrefs geohash, MGRS, Maidenheadwhat3wordscalling codes

Page 29: The OpenCage Geocoder #lpw2014

Start geocoding:opencagedata.com

Page 30: The OpenCage Geocoder #lpw2014

Geo::Coder::OpenCage

Page 31: The OpenCage Geocoder #lpw2014

use Data::Printer;use Geo::Coder::OpenCage;

my $Geocoder = Geo::Coder::OpenCage->new(api_key => '6d7b256c....'); p $Geocoder->reverse_geocode(

lat => 51.52089885,lng => -0.14007993

);

Page 32: The OpenCage Geocoder #lpw2014

Formatting components {

city "City of Westminster", country "United Kingdom", country_code "gb", county "London", house_number 115, postcode "W1T 5DU", road "New Cavendish Street", state "England", state_district "Greater London", suburb "Fitzrovia", university "University of Westminster" },

Page 33: The OpenCage Geocoder #lpw2014

Formatting components {

city "City of Westminster", country "United Kingdom", country_code "gb", county "London", house_number 115, postcode "W1T 5DU", road "New Cavendish Street", state "England", state_district "Greater London", suburb "Fitzrovia", university "University of Westminster" },

formatted "University of Westminster, 115 New Cavendish Street, London W1T 5DU, United Kingdom",

Page 34: The OpenCage Geocoder #lpw2014

115 New Cavendish Street, London W1T 5DU, United Kingdom

223 William Street, Melbourne VIC 3000, Australia

Rosenthaler Straße 1, 10119 Berlin, Germany

Via Pisacane, 13, 76121 Barletta BT, Italy

3 Upper Alma Road, Rosebank, Cape Town, 7700, South Africa

Page 35: The OpenCage Geocoder #lpw2014

Geo::Address::Formatter

Perl parser of open source address templates, see https://github.com/lokku/address-formatting

Page 36: The OpenCage Geocoder #lpw2014

Annotationstimezones OS gridrefs geohash, MGRS, Maidenheadwhat3wordscalling codes

Page 37: The OpenCage Geocoder #lpw2014

The Power of CPAN

timezone DateTime::TimeZone OS gridrefs Geo::Coordinates::OSGB geohash Geo::Hash::XS MGRS Geo::Coordinates::UTM Maidenhead Ham::Locator what3words Geo::What3Words calling codes Number::Phone::CountryCode

Page 38: The OpenCage Geocoder #lpw2014
Page 39: The OpenCage Geocoder #lpw2014

We need your help

https://github.com/lokku

Page 40: The OpenCage Geocoder #lpw2014

Like geo?

Page 41: The OpenCage Geocoder #lpw2014

See you at #geomob13th Jan geomobldn.org

Page 42: The OpenCage Geocoder #lpw2014

Ed FreyfogleLondon Perl Workshop - 8 Nov. 2014

http://opencagedata.com@opencagedata

Thanks! Questions?