mvysny / photocloud-frame-slideshow

Android Digital Photo Frame
https://www.android-photo-frame.eu
15 stars 1 forks source link

Filter Slideshow content by geolocation #129

Open andyfrei opened 4 years ago

andyfrei commented 4 years ago

Hey guys Any plans towards adding a geolocation filter? Like

Or even having an option to create a simple boundary in a map and show only pictures taken within or outside that boundary?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/91875067-filter-slideshow-content-by-geolocation?utm_campaign=plugin&utm_content=tracker%2F53303527&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F53303527&utm_medium=issues&utm_source=github).
mvysny commented 4 years ago

Unfortunately this is much harder than it sounds. The problem is that every request to resolve a GPS coordinate to an Address object (which also includes the country) goes to Google servers and is bandwidth-limited. So I can't simply take a list of photos and rapidly resolve their addresses in hopes to filter the photos out, since that would most probably cause Google blocking my app from performing a GPS resolve.

Theoretically I could cache the resolved country for every photo, but the initial population of the database would be problematic - I would need to avoid rapid resolving yet somehow quickly show something.

In short, I'm not sure whether I can implement such a feature... unless there is a library that can convert GPS to country name quickly and offline. Since the country borders do not change that often :-D it could very well be possible. Let me check :-p

mvysny commented 4 years ago

I'll be damned, there is such a library: https://github.com/bencampion/reverse-country-code :-D

That could work, but only for countries. There is no such (offline) library for cities.

andyfrei commented 4 years ago

Well, why not... ;Dandyonthemove -------- Ursprüngliche Nachricht --------Von: Martin Vysny notifications@github.com Datum: 08.05.20 22:25 (GMT+01:00) An: mvysny/photocloud-frame-slideshow photocloud-frame-slideshow@noreply.github.com Cc: Andy Frei andy.frei1981@gmail.com, Author author@noreply.github.com Betreff: Re: [mvysny/photocloud-frame-slideshow] Filter Slideshow content by geolocation (#129) I'll be damned, there is such a library: https://github.com/bencampion/reverse-country-code That could work, but only for countries. There is no such (offline) library for cities.

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/mvysny/photocloud-frame-slideshow/issues/129#issuecomment-626004374", "url": "https://github.com/mvysny/photocloud-frame-slideshow/issues/129#issuecomment-626004374", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]