Closed jkasten80 closed 1 year ago
The image doesn't have city/state/country information in it directly. We use a reverse geocoding library that relies on data dumps from geonames to do a reverse lookup from the gps coordinates. The accuracy of that information is tied to the precision the library is configured to use, combined with the accuracy of the data. Immich itself is not going to be able to do much in terms of accuracy.
See:
We can adjust the precision in the Dockerfile, but what is the default? (By default the precision env var is commented out). I'm experiencing the same issue, - and it is not because the town is to small.
You can turn on verbose logging and reupload the picture in question to see what data we're getting back. This is pretty much all the code:
I checked the coordinates of the pictures with the geonames database and the coordinates and names are correct in the database but the names in the pictures are wrong.
Have you tried reuploading the photo with verbose logging?
How can I do this? When I try to delete the pic it will be deleted also from the phone.
Not 100% sure about how to do it on the phone. You can delete in from the web though.
Ahh sure... I'll try it and give feedback. I'll check some more pics and no Pic have the correct geolocation name. The map is always correct.
I reuploaded the pic with verbose log on, which logs do you need now? Which container?
I found it.. in the logs its also "Kronshagen" which is wrong. do you need anything special from the logs?
Let me see if I can investigate.
[Nest] 1 - 06/07/2023, 12:48:52 PM DEBUG [GeocodingRepository] Normalized: {"country":"Germany","state":"Schleswig-Holstein","city":"Kronshagen"} [Nest] 1 - 06/07/2023, 12:48:53 PM DEBUG [GeocodingRepository] Request: 54.3158861111111,10.0692583333333 [Nest] 1 - 06/07/2023, 12:48:53 PM VERBOSE [GeocodingRepository] Raw: [ { "geoNameId": "2883647", "name": "Kronshagen", "asciiName": "Kronshagen", "alternateNames": "Kronshagen,Kronskhagen,ke long sha gen,Кронсхаген,克龙沙根", "latitude": "54.33333", "longitude": "10.08333", "featureClass": "P", "featureCode": "PPLA4", "countryCode": "DE", "cc2": null, "admin1Code": { "name": "Schleswig-Holstein", "asciiName": "Schleswig-Holstein", "geoNameId": "2838632" }, "admin2Code": "00", "admin3Code": "01058", "admin4Code": "01058092", "population": "11856", "elevation": null, "dem": "23", "timezone": "Europe/Berlin", "modificationDate": "2011-07-31", "distance": 2.143599727736647 }
Here are some logs .. What does the modification date say?
It's not going to match Hasseldieksdamm
because it doesn't show up in the cities1000
dump (it doesn't have a population and the cities files we're using only includes cities with 1000+ population).
Ok, the way to fix this would be to put 1000 under population? Thats a little bit strange. There are a lot parts of Kiel that could be under 1000 People. Kronshagen is defintiv wrong, Kiel would be ok because Hasseldieksdamm is a part of Kiel
Immich, a photo management tool, has implemented this feature, reverse geocoding, by using data provided from http://www.geonames.org/
. For questions about the accuracy of the data, you will have to consult geonames directly. For requests to update the data we're using cities1000.txt
, you will also have to consult geonames. Obviously, the data is not going to be perfect and I'm not sure where they get the information from for this specific region. The data is provided for free, so it's the best we can do at the moment. I think, while technically not the closest populated city, Kronshagen is the closest known city and happens to be only one to two miles away from the original gps point.
But Kronshagen is not Kiel, and Hasseldieksdamm is a part of Kiel. Kiel has 250k population. Ill try to fix this over geonames
Maybe for future updates on your photo management software, could you integrate google api as an alternativ for people who want this (to use an own key)
Feel free to open a feature request for an alternative reverse geocoding implementation (google maps). We could definitely add a setting for a google maps key and use that, which is probably much more accurate. The implementation we use doesn't take city/country boundaries into consideration. It's just the distance between the point of the image and the gps locations of the cities in the dump from geonames.
That would be great! Your software is awesome and i like to use it more. Ill try to put a feature request .
The bug
The geolocation of the pictures is wrong. The map is correct but the title says a location 5-10km away from the location in the map.
The OS that Immich Server is running on
Synology NAS
Version of Immich Server
v1.60
Version of Immich Mobile App
v1.60.0 build 100
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Additional information
No response