Places: Allow to search for any location name #2380

Open
opened 2026-02-20 01:10:41 -05:00 by deekerman · 2 comments
Owner

Originally created by @tilusnet on GitHub (Aug 4, 2025).

Currently Places Search only seems to work when it is able to match some metadata in the photos location.
However it would be most useful if it worked like google maps.

For example I have many pictures taken in the English countryside, in various locations. I don't remember the towns and villages the pictures were taken in (info of metadata), however I remember that they were taken in "England" or in "Sussex".
So I will search for "Sussex" but Phoroprism doesn't have a clue where "Sussex" is.
At least implement country names so that I don't have to zoom in manually from the "world map". Very cumbersome.

Originally created by @tilusnet on GitHub (Aug 4, 2025). Currently Places Search only seems to work when it is able to match some metadata in the photos location. However it would be most useful if it worked like google maps. For example I have many pictures taken in the English countryside, in various locations. I don't remember the towns and villages the pictures were taken in (info of metadata), however I remember that they were taken in "England" or in "Sussex". So I will search for "Sussex" but Phoroprism doesn't have a clue where "Sussex" is. At least implement country names so that I don't have to zoom in manually from the "world map". Very cumbersome.
Author
Owner

@lastzero commented on GitHub (Aug 5, 2025):

You are absolutely right! That would be possible with the new API endpoints that were recently added for the location selection dialog:

My only concern is that if the location isn't found in the database, a generic location search in Places might then send a request to a service we host on our servers. Some users might not like this due to data privacy implications, though we don't log/analyze the requests. While we're not in the business of selling your data, this is still something we need to take seriously.

One possible compromise could be to perform a limited, local search using a small database containing only countries and major cities. However, that would require extra work because we could not reuse the existing endpoints. In other words, it would take us longer to develop and release.

Alternatively, settings would need to be added to configure the behavior, and we would need to explain clearly how it works to avoid criticism for luring users into a "trap" that enables us to "see" their search requests. Again, we don't do anything with that data, but it's still something we need to take seriously and communicate clearly.

@lastzero commented on GitHub (Aug 5, 2025): You are absolutely right! That would be possible with the new API endpoints that were recently added for the location selection dialog: - https://github.com/photoprism/photoprism/issues/465 My only concern is that if the location isn't found in the database, a generic location search in Places might then send a request to a service we host on our servers. Some users might not like this due to data privacy implications, though [we don't log/analyze](https://www.photoprism.app/privacy) the requests. While we're not in the business of selling your data, this is still something we need to take seriously. One possible compromise could be to perform a limited, local search using a small database containing only countries and major cities. However, that would require extra work because we could not reuse the existing endpoints. In other words, it would take us longer to develop and release. Alternatively, settings would need to be added to configure the behavior, and we would need to explain clearly how it works to avoid criticism for luring users into a "trap" that enables us to "see" their search requests. Again, we don't do anything with that data, but it's still something we need to take seriously and communicate clearly.
Author
Owner

@keif888 commented on GitHub (Aug 21, 2025):

If I was conceptualising this, with a zero outbound connection requirement, I would have the search box work like a type ahead address box, which queries into the PhotoPrism database, with a limit of 5 results. The user then clicks on the one they want (or refines the search), and the map relocates to that location. It's no longer searching just for photos, but also for places, whether there are photos or not. Maybe returning an indicator of whether there are photos associated with the search request.

Assuming that the licensing is ok, there is a free (Creative Commons Attribution 4.0 license) dataset of just over 48k cities and their geo locations here.
An alternative is here, which is covered by the Open Data Commons Open Database License (ODbL).
Either of these could be processed into a set of places to load into PhotoPrism's countries and places as a base set of searchable data.

For the Sussex example above, the result would be 1 US city, and 30 UK cities (in East or West Sussex) from the simplemaps data.
The trick will be working out how to order the results.

My guess on development requirements:
Front end update to Search box to call API on user data entry pause, and show places results, and then allow user to select, and relocate map to that area
Front end update to map to allow zoom to S2 geometry as well as how it works now
API update required to support places search as well as photos search
Backend update to API to call to include search of places with limits and suitable ordering to result
Data load of set of cities and countries

@keif888 commented on GitHub (Aug 21, 2025): If I was conceptualising this, with a zero outbound connection requirement, I would have the search box work like a type ahead address box, which queries into the PhotoPrism database, with a limit of 5 results. The user then clicks on the one they want (or refines the search), and the map relocates to that location. It's no longer searching just for photos, but also for places, whether there are photos or not. Maybe returning an indicator of whether there are photos associated with the search request. Assuming that the licensing is ok, there is a free (Creative Commons Attribution 4.0 license) dataset of just over 48k cities and their geo locations [here](https://simplemaps.com/data/world-cities). An alternative is [here](https://www.geoapify.com/download-all-the-cities-towns-villages/), which is covered by the Open Data Commons Open Database License (ODbL). Either of these could be processed into a set of places to load into PhotoPrism's countries and places as a base set of searchable data. For the Sussex example above, the result would be 1 US city, and 30 UK cities (in East or West Sussex) from the simplemaps data. The trick will be working out how to order the results. My guess on development requirements: Front end update to Search box to call API on user data entry pause, and show places results, and then allow user to select, and relocate map to that area Front end update to map to allow zoom to S2 geometry as well as how it works now API update required to support places search as well as photos search Backend update to API to call to include search of places with limits and suitable ordering to result Data load of set of cities and countries
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/photoprism#2380
No description provided.