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

Is Location indexed at the start? #82

Open
sapnho opened this issue Mar 21, 2021 · 4 comments
Open

Is Location indexed at the start? #82

sapnho opened this issue Mar 21, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@sapnho
Copy link

sapnho commented Mar 21, 2021

I was wondering how the location filter works? I noticed that when I entered "France" it showed me only a few of my "France" images and this morning it was many more.

I guess the location is only added to the database once it has been shown. So for the location filter to work properly, you have to have a least one complete run, right?

@sapnho
Copy link
Author

sapnho commented Mar 21, 2021

And are keywords parsed in all files at the start or is it the same logic as locations?

@paddywwoof
Copy link
Collaborator

The exif info is read quite quickly but not instantaneously on first start - maybe by the time two or three images have shown the keywords, title, lat, lon etc will be available. However the select list will only be refreshed once all the images have been shown [n times]. As you say the location description is only downloaded from Nominatim when the image is actually shown, however this is based on lat, lon to four decimal places so you could well have multiple images that all get location description at the same time as soon as one of them is looked up.

Two things occur to me:
a) we could have an additional category in ImageCache.__update_cache() of records with lat, lon but not yet description. These could be 'ticked off' one at a time as __update_cache runs once every two seconds and Nominatim have a maximum query rate of one per second.
b) we could re-use the k-means clustering method used for the mat colour to group and order images by proximity

@sapnho
Copy link
Author

sapnho commented Mar 21, 2021

b) we could re-use the k-means clustering method used for the mat colour to group and order images by proximity

That sounds intriguing. So, we could specify a radius around a location?

@sapnho
Copy link
Author

sapnho commented Mar 21, 2021

a) we could have an additional category in ImageCache.__update_cache() of records with lat, lon but not yet description. These could be 'ticked off' one at a time as __update_cache runs once every two seconds and Nominatim have a maximum query rate of one per second.

Sounds like a solution.

@helgeerbe helgeerbe added the enhancement New feature or request label Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants