Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache coordinates and place names for geolocation lookups #47

Closed
jmathai opened this issue Dec 25, 2015 · 2 comments
Closed

Cache coordinates and place names for geolocation lookups #47

jmathai opened this issue Dec 25, 2015 · 2 comments

Comments

@jmathai
Copy link
Owner

jmathai commented Dec 25, 2015

When looking up a geolocation coordinate we can cache the value to limit the number of lookups needed. A few considerations to make...

  • Store location name (i.e. Sunnyvale, CA) to a lat/lon pair
  • Store a lat/lon pair (i.e. extracted from EXIF)

lat/lon pairs within a certain radius of a pair that's already stored should return the stored location name. (see gelocation.place_name). When a pair is not within a certain radius of a stored lat/lon pair it should be looked up against an API and stored.

// cc @zingo

@zingo
Copy link
Contributor

zingo commented Dec 25, 2015

Here is an initial version
#48
Currently database look up don't scale well, but I'm unsure if it is a real problem as it might not contain a lot of entry's. (In my test I got 84 entry's for about 1 year of photos, with some travels)
Some item needing input, mabe in this commit or in a followup commit if you like to keep each commit simple:

  • Should I add a simple lookup runtime cache for 3-5 last items, I think most new photos added will be from the same or few areas.
  • The 3km range, should that be configurable in the config.ini file or is that overdoing it?
  • Should we cache Unknows locations so they do not need to be re-lookedup on?
  • Spotted that the Db is created 2 times per image (one time before) and the db-files are re-read everytime.

Interesting project this one you manage to create something I longed for!!!

jmathai added a commit that referenced this issue Dec 28, 2015
@jmathai
Copy link
Owner Author

jmathai commented Dec 29, 2015

Merged gh-48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants