Skip to content

[stable25] Add CLI and listeners to reverse geocode pictures' coordinates#1643

Closed
backportbot-nextcloud[bot] wants to merge 1 commit into
stable25from
backport/1310/stable25
Closed

[stable25] Add CLI and listeners to reverse geocode pictures' coordinates#1643
backportbot-nextcloud[bot] wants to merge 1 commit into
stable25from
backport/1310/stable25

Conversation

@backportbot-nextcloud

@backportbot-nextcloud backportbot-nextcloud Bot commented Feb 22, 2023

Copy link
Copy Markdown
  • ⚠️ This backport had conflicts and is incomplete

backport of #1310

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>
@backportbot-nextcloud backportbot-nextcloud Bot added the enhancement New feature or request label Feb 22, 2023
@backportbot-nextcloud backportbot-nextcloud Bot added this to the Nextcloud 25.0.4 milestone Feb 22, 2023
@artonge

artonge commented Feb 22, 2023

Copy link
Copy Markdown
Collaborator

This is a feature, so closing

@artonge artonge closed this Feb 22, 2023
@skjnldsv skjnldsv deleted the backport/1310/stable25 branch January 7, 2025 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant