[BUG] Prioritize map clustering by country instead of distance #918

Closed
opened 2026-02-04 23:32:44 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @dominikheinz on GitHub (Jun 6, 2023).

The bug

Summary:
When zooming out on the map-view in Immich, bubbles of the picture count are clustered together. However, purely clustering by distance might not always be the best choice, especially if it groups pictures from different countries together.
Let's look at an example picture, to better understand what I mean:

When zoomed in, in this example we see 482 pictures taken in South Korea, and 232 pictures (185+47) taken in Japan.

Now when I zoom out, the pictures cluster across countries (It groups some of pictures from Japan with the pictures from South Korea). It now looks as if 529 pictures were taken in South Korea, and only 185 in Japan - even tho that is obviously not the case.

Maybe it is possible to prioritize grouping by country, if the distance between the clusters are similar (?).
I am aware that this is a very niche problem, bought I thought it might still be worth mentioning.

The OS that Immich Server is running on

Alpine Linux 3.16

Version of Immich Server

v1.60.0

Version of Immich Mobile App

v1.60.0 build.83

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

-- not relevant --

Your .env content

-- not relevant --

Reproduction steps

1. Have pictures with geo-coords from 2 different countries on 3 positions with similar distance.
2. Observe when zooming out, clustering prioritizes grouping purely by distance, across countries.

Additional information

No response

Originally created by @dominikheinz on GitHub (Jun 6, 2023). ### The bug **Summary:** When zooming out on the map-view in Immich, bubbles of the picture count are clustered together. However, purely clustering by distance might not always be the best choice, especially if it groups pictures from different countries together. Let's look at an example picture, to better understand what I mean: When zoomed in, in this example we see 482 pictures taken in South Korea, and 232 pictures (185+47) taken in Japan. ![](https://i.imgur.com/trUDP8j.png) Now when I zoom out, the pictures cluster across countries (It groups some of pictures from Japan with the pictures from South Korea). It now looks as if 529 pictures were taken in South Korea, and only 185 in Japan - even tho that is obviously not the case. ![](https://i.imgur.com/F0lHqgz.png) Maybe it is possible to prioritize grouping by country, if the distance between the clusters are similar (?). I am aware that this is a very niche problem, bought I thought it might still be worth mentioning. ### The OS that Immich Server is running on Alpine Linux 3.16 ### Version of Immich Server v1.60.0 ### Version of Immich Mobile App v1.60.0 build.83 ### Platform with the issue - [ ] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML -- not relevant -- ``` ### Your .env content ```Shell -- not relevant -- ``` ### Reproduction steps ```bash 1. Have pictures with geo-coords from 2 different countries on 3 positions with similar distance. 2. Observe when zooming out, clustering prioritizes grouping purely by distance, across countries. ``` ### Additional information _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#918