Immich ReverseGeo
Immich ReverseGeo is a reverse geocoding aid for existing Immich photo libraries that can read photo assets with GPS coordinates and write more accurate city, state, and country information back to the Immich database.
Note: If you are using Immich in Lazy Cat Micro Service, you need to first use the port forwarding tool to forward the Immich PostgreSQL port, and then fill in the configuration wizard accordingly. You only need to fill in the IP address, and the rest will be done by default. See the attached figure. ##Functional characteristics - Immich database direct connection processing: Read photo assets with existing latitude and longitude in Immich PostgreSQL, and write the parsed `city`,`state`, and `country` back to `asset_exif`. - Batch reverse geocoding: Automatically finds unprocessed photos, processes them in batches, supports delay and parallelism adjustment, and is suitable for gradual correction in large photo libraries. - Overture Maps Administrative Region Analysis: Built-in national-level data and download national-level segmentation caches on demand to improve matching between countries, states, provinces, and cities. - Enhancements to airports and transportation hubs: Built-in basic airport data, allowing priority to be given to location names that are more consistent with the photo scene within the airport. - Lookup trial page: Enter coordinates and preview country, administrative region, city candidate and diagnostic information, making it easy to verify first and then write the database in batches. - City Resolver tuning: Supports adjusting the priority of city candidate types, overriding default rules by country, and verifying results in Lookup. - Optional GADM Borough Data: Download the GADM country cache when needed as a supplementary or preferred borough source for Overture. - Data management and replay: You can view the downloaded geographical data cache, delete or re-download the cache, or you can clear the existing reverse geographical fields in Immich by scope and process them again. - Scheduling tasks and logging: Support automatic timing processing, manual triggering processing, viewing operation logs and troubleshooting processing status. ###First use process 1. Fill in Immich PostgreSQL connection information during installation: `DB_HOST`,`DB_PORT`,`DB_USERNAME`,`DB_PASSWORD`,`DB_DATABASE_NAME`. 2. Open the application address and wait for the service to complete. 3. Go to the Settings page first, verify that the database connection information is correct, and check the automatic processing plan, batch size, processing delay and parallelism. 4. Turn off built-in reverse geocoding in Immich to prevent Immich and Immich ReverseGeo from writing the same set of location fields at the same time. 5. Make sure in Immich that the photos you plan to use for testing meet the "Photo Requirements" below, otherwise the Dashboard may display 'nothing to process'. 6. Use the Lookup page to enter a set of photo coordinates and verify that the parsed country, state, and city meet expectations. 7. It is recommended to back up Immich PostgreSQL first and then manually trigger a small-scale processing from the Dashboard (optional). ###Photo requirements in Immich 1. The photo must have GPS coordinates written, that is,'latitude' and 'longitude' cannot be null values; photos without coordinates will not enter the processing queue. 2. By default, the app will only grab assets with `city IS NULL` and `country IS NULL`; if the photo already has a city or country value in Immich, the Dashboard will not count it into the number to be processed. 3. If you want to replay a photo with location data written, you need to go to the Data page to clear the photo's city, state, and country, or reset it by city/country before running. 4. Assets in deleted status will not be processed. 5. When an application writes back, you need to get available country and city results; if a photo can only recognize the country but cannot get the city, the current version will skip writing, and the photo will continue to be retried in subsequent runs. 6. The most suitable test photo for the first round of verification is an ordinary photo with GPS coordinates visible in Immich and empty `city` and `country`. ###Daily usage 1. Check the number of photos to be processed, recent processing status and running progress in the Dashboard. 2. When you need to verify a single coordinate, go to the Lookup page to enter the latitude and longitude, and check the candidate results of Overture, Airport Matching, and optional GADM; currently, the China Overture administrative cache has been preset in the Lazy Cat bag, and the results can usually be returned directly for China coordinates. 3. When you need to adjust the city name selection, go to the City Resolver page to modify the global or national rules, and then return to the Lookup page to retest. 4. When batch recalculation is needed, go to the Data page to clear the written reverse geographical fields by asset GUID, city, state, country, or full library scope, and then rerun the process. 5. When you need to save space or refresh geographical data, delete the Overture or GADM cache in the specified country on the Geo Boundaries page and download it again the next time you use it. 6. Check the Logs page regularly to make sure there are no abnormalities in download caching, database writes, and timing tasks.



