DenisCarriere / geocoder

:earth_asia: Python Geocoder
http://geocoder.readthedocs.org
MIT License
1.63k stars 288 forks source link

Opencage Geocoder #75

Closed themiurgo closed 10 years ago

themiurgo commented 10 years ago

It would be nice to have also this provider. Nestoria is a company that manages property search in many countries and apparently they use this geocoded themselves. http://geocoder.opencagedata.com

DenisCarriere commented 10 years ago

That's pretty cool that they include the License for the Data, this makes it more official to include this in OpenStreetMap datasets with confidence that you have the correct ODbL license.

It shouldn't take me too long to include this in the Geocoder: JSON URL Request

http://api.opencagedata.com/geocode/v1/json?query=Ottawa+Ontario&pretty=1&key=YOUR-KEY-HERE
DenisCarriere commented 10 years ago

I've added the OpenCage provider to the Geocoder, try it out and see if it works well. I've included a test key so you won't have a provide one, but if you need to provide your own key.

g = geocoder.opencage('<location>', key=<YOUR_API_KEY>)

Cheers

themiurgo commented 10 years ago

That's great!