Skip to content

Places: Support sub-km distances when searching for locations #3558

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

Closed
loulou91 opened this issue Jul 20, 2023 · 5 comments
Closed

Places: Support sub-km distances when searching for locations #3558

loulou91 opened this issue Jul 20, 2023 · 5 comments
Assignees
Labels
idea Feedback wanted / feature request places Geocoding & Maps released Available in the stable release

Comments

@loulou91
Copy link

Present geographical search is a nice feature and works well but precision is today 1 km which may be sometimes too rough.
I tried to enter dist:0.1 but I got an error ("unable to do that").
I think dist unit is integer...
Could it be possible to increase precision using float in place of integer or to change unit km to meter?

Thanks in advance.

@loulou91 loulou91 added the idea Feedback wanted / feature request label Jul 20, 2023
@lastzero
Copy link
Member

It's an approximation due to how the query works (for maximum compatibility with all databases). Accepting a floating point number instead of an integer should still be possible to implement with reasonable effort.

lastzero added a commit that referenced this issue Sep 20, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
lastzero added a commit that referenced this issue Sep 20, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
lastzero added a commit that referenced this issue Sep 20, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero lastzero changed the title improve geographical search precision (lat lng dist) Places: Add support for sub-km distances when searching for locations Sep 20, 2023
@lastzero lastzero changed the title Places: Add support for sub-km distances when searching for locations Places: Support sub-km distances when searching for locations Sep 20, 2023
lastzero added a commit that referenced this issue Sep 20, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero lastzero self-assigned this Sep 20, 2023
@lastzero lastzero moved this to Development 🐝 in Roadmap 🚀✨ Sep 20, 2023
lastzero added a commit that referenced this issue Sep 20, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero
Copy link
Member

@loulou91 I've started a new preview build so you can test these changes, it should be available within the next hour:

Note that our public demo at https://demo.photoprism.app/ will be updated as well if you don't want to use our preview build to test with your own pictures.

@lastzero lastzero added places Geocoding & Maps please-test Ready for acceptance test labels Sep 20, 2023
@lastzero lastzero moved this from Development 🐝 to Preview 🐳 in Roadmap 🚀✨ Sep 20, 2023
@lastzero
Copy link
Member

A screenshot of the Places view, with a distance of less than one kilometer specified in the search box (the same works for the regular search, although it's harder to test without a map):

places

Note: Instead of searching for the S2 cell ID, you can also use the lat and lng filters.

@loulou91
Copy link
Author

loulou91 commented Sep 21, 2023

Thanks a lot for the implementation !
Looks fine for me with "lat: lng: dist:" dist unit being km (and sub-km). Map size is adapted according to dist ;-) It looks working with general search field as well.
I tested your example with cell ID (s2) I was not aware of, and with city instead of lat lng but in that case dist is not operand. Maybe it's normal?

@graciousgrey graciousgrey added released Available in the stable release and removed please-test Ready for acceptance test labels Sep 24, 2023
@graciousgrey graciousgrey moved this from Preview 🐳 to Released 🌈 in Roadmap 🚀✨ Sep 24, 2023
@graciousgrey
Copy link
Member

Thank you very much for testing :)

I tested your example with cell ID (s2) I was not aware of, and with city instead of lat lng but in that case dist is not operand. Maybe it's normal?

The city search filter cannot be used in combination with dist because we do not have the city boundary coordinates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Feedback wanted / feature request places Geocoding & Maps released Available in the stable release
Projects
Status: Release 🌈
Development

No branches or pull requests

3 participants