jmathai / elodie

An EXIF-based photo assistant, organizer and workflow automation tool.
https://bit.ly/introducing-elodie
Apache License 2.0
1.26k stars 138 forks source link

Use Google API for location #258

Open navaneeth opened 6 years ago

navaneeth commented 6 years ago

Great work on elodie. Just loving it.

However, I am having a bit of issues with the location. In the config.ini, I have told elodie to name my directories like %city, %state.

This works well when major city names are used. A working eg:

./elodie.py update --location=Bangalore

My directories will be named like, Bangalore, Karnataka.

But when I set more accurate location, the API is unable to get it. Eg:

./elodie.py update --location=Koramangala

In this case, the directories are named as Karnataka. But the actual image has Koramangala as the location.

To me, this looks like a limitation of Mapquest API.

How about using Google Maps API, which is much more detailed. I am referring to https://maps.googleapis.com/maps/api/geocode/json. Google maps also has a free API version available like Mapquest.

If this sounds alright, I can work on it and send you a PR.

jmathai commented 6 years ago

Thanks for opening the issue. I've had similar problems :).

A PR would be great. Do you happen to know what Google's TOS are for using their API? I recall some required that you need to use the results to plot points on a Google Map.

For a PR, I would suggest adding a [GoogleMaps] section to the config and somehow overloading the functions in geolocation.py. Keep in mind that we'll want to have tests continue to pass and add tests for any new classes or functions.

navaneeth commented 6 years ago

I couldn't see any relevant section in the Maps API TOS about the kind of usage which elodie will have. Do you see it somewhere?

jmathai commented 6 years ago

Looks like there are free tiers depending on the API being used. elodie should qualify for free and public.

https://developers.google.com/maps/pricing-and-plans/#details

ldexterldesign commented 4 years ago

FYI

I tried to login to my mapquest (owned by verizon, yuk) account today and it seems to have been deleted?!

I only use the account for elodie and haven't done any elodie stuff for a while but deleting my account without warning seems a bit shitty

I'm no google fan but I'm supporting this

Aside, using [o]penstreetmap.org would be cool, it's FOSS after-all - is that possible?

Regards

👋 https://github.com/jmathai/elodie/issues/45

o: http://openstreetmap.org

NEprod commented 4 years ago

Sorry to bring up an old thread but did this ever come to fruition mapquest doesn’t like the area I’m from and tends to place all locations around me as just England instead of area this would be useful.