Skip to content
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

Add CLI and listeners to reverse geocode pictures' coordinates #1310

Merged
merged 1 commit into from
Feb 22, 2023

Commits on Feb 22, 2023

  1. Add commands and listeners to generate location data of files:

    The location data is stored inside `oc_files_metadata`.
    
    - `occ photos:update-1000-cities` to update the cities1000 file.
    - `occ photos:map-media-to-location`to map picture coordinates to a location
    
    - `ReverseGeoCoderService` download the necessary files and build the `KDTree`
    - `UpdateReverseGeocodingFilesCommand` command to allow to manually create the needed reverse geocoding files
    - `MediaLocationManager` to manager the location mappings
    - `MapMediaToLocationCommand` command to manually trigger location data mapping. Useful for pre-existing pictures.
    - `LocationManagerNodeEventListener` to react to node, user and share events.
    - `MapMediaToLocationJob` to reduce the load in event listeners
    
    ```php
                                              ┌─────────────────────┐
                                ┌────────────►│MapMediaToLocationJob│
                                │             └─────────┬───────────┘
                                │                       │
       ┌────────────────────────┴───────┐               │
       │LocationManagerNodeEventListener├──┐            ▼
       └────────────────────────────────┘  │  ┌────────────────────┐     ┌──────────────┐
                                           ├─►│MediaLocationManager├────►│LocationMapper│
       ┌─────────────────────────┐         │  └─────────┬──────────┘     └──────────────┘
       │MapMediaToLocationCommand├─────────┘            │
       └─────────────────────────┘                      │
                                                        ▼
       ┌──────────────────────────────────┐   ┌──────────────────────┐
       │UpdateReverseGeocodingFilesCommand├──►│ReverseGeoCoderService│
       └──────────────────────────────────┘   └──────────────────────┘
    ```
    
    Signed-off-by: Louis Chemineau <louis@chmn.me>
    artonge committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    d94f30c View commit details
    Browse the repository at this point in the history