mirror of
https://github.com/photoprism/photoprism.git
synced 2026-03-02 22:57:18 -05:00
Metadata: Estimate location by Google's Location History #869
Labels
No labels
ai
android
api
auth
awesome
bug
bug
ci
cli
config
database
declined
deprecated
docker
docs 📚
documents
duplicate
easy
enhancement
enhancement
enhancement
epic
faces
feedback wanted
frontend
hacktoberfest
help wanted
idea
in-progress
incomplete
index
invalid
ios
labels
live
live
low-priority
macos
member-feature
metadata
mobile
nas
needs-analysis
no-coding-required
no-coding-required
observability
performance
places
please-test
plus-feature
priority
pro-feature
question
raspberry-pi
raw
released
released
released
research
resolved
security
sharing
tested
tests
third-party-issue
thumbnails
upgrade
upstream-issue
ux
vector
video
waiting
won't fix
won't fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/photoprism#869
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @GuiltyFox on GitHub (Apr 5, 2021).
Export Location History from https://takeout.google.com/
then use it for estimate location of pictures
@lastzero commented on GitHub (Apr 13, 2021):
Oh wow, you may export the full Location History... that's nice.
@GuiltyFox commented on GitHub (Apr 15, 2021):
Inside my takeout-20210416T015533Z-001.zip
File format description in archive_browser.html
@GuiltyFox commented on GitHub (Apr 15, 2021):
For example files
Takeout\Location History\Semantic Location History\2015\2015_JULY.json
2015_JULY.txt
First 1000 lines of Takeout\Location History\Location History.json
first1000 of Location History.txt
@el-tiuri commented on GitHub (May 24, 2021):
FYI: you can do this with digiKam if you have gpx files (which you should be able to create from kml files). If you enable writing the location to metadata it becomes usable in all applications that pull from that metadata, including Photoprism.
@n-patiphon commented on GitHub (Jul 22, 2021):
It seems like ExifTool can also be used to geotag photos using a GPX file as well. See https://exiftool.org/geotag.html.
@motey commented on GitHub (Nov 3, 2022):
Proposal: If this feature will ever reach implementation, i would appreciate to prioritize support of gpx files instead of the custom google kml format. We move here in the "selfhosting"-realm and gpx-track-support would be compatible with a wider range of use cases. (e.g. i track myself via Nextcloud/PhoneTrack). Also: KML files can be converted to gpx files. So maybe we can rename the issue to
Places: Estimate location by gpx track dataHint: The tricky part is that many cameras tag images with none timezone aware timestamps. In practice most image timestamps can be still matched too a gpx trackpoint if source data is not ambiguous (multiple gpx tracks, timezone crossing at same day)
From time to time i tinker on a python solution for the same problem https://github.com/motey/auto-photo-geo-tagger
But at the moment i dont have enough time to bring this project over the finish line in the foreseeable future. But maybe i can provide some help for a solution in photoprism.
@lastzero commented on GitHub (Nov 3, 2022):
Either someone contributes it or we can grow our team. Both would be perfect.
@Symbianx commented on GitHub (Aug 16, 2023):
I made a go tool that reads the google takeout location history file and tries to add locations to photos based on the time the picture was taken: Symbianx/google-takeout-photo-location-fixer.
@lastzero How do you envision this functionality being integrated into photoprism?
@lastzero commented on GitHub (Aug 16, 2023):
@Symbianx I guess the easiest way would be a CLI subcommand!?
@StudioLE commented on GitHub (Aug 17, 2023):
@lastzero Would it not make more sense to implement this kind of feature as a Plugin?
This is a feature that some but not many users will want, by integrating it fully into PhotoPrism you may end up maintaining it yourself but implement it as a plugin and the community take on that responsibility. That also makes it easier to fork the feature and adapt it to other data sources. Such as location tagging based on Strava data etc?
I see there's already an issue for plugins #117 so I'll add my other thoughts there.
@Symbianx commented on GitHub (Aug 17, 2023):
I don't know the code base but I assume that would be a straight forward thing.
@StudioLE A plugin system would be a great fit for this kind of stuff, for sure. I wonder what's the status on that issue is.
@StudioLE commented on GitHub (Aug 17, 2023):
@Symbianx It looks like your solution works by directly editing the EXIF of the image files themselves whereas I would imagine a PhotoPrism plugin would edit the geolocation information stored in the database.
By taking that approach you could:
google-takeout-photo-location-fixerto thedocker-compose.ymlInclude the google location
.jsonas a volume.docker compose rungoogle-takeout-photo-location-fixerlogic to match the date/time to the location.As far as I'm aware that workflow would be possible without any modification of PhotoPrism itself. Although in future I imagine:
.jsonand trigger the workflow rather than relying on the docker compose CLI@lastzero commented on GitHub (Aug 17, 2023):
@StudioLE @Symbianx PhotoPrism has a REST API. It could be better documented, but it works and many apps already use it. So I'm not sure what additional plugin system you would need for a pure backend solution? Maybe event hooks that can be invoked when indexing is done, for example? You could also write directly to the SQL database, or update the file metadata and then simply re-index...
@Symbianx commented on GitHub (Aug 17, 2023):
@StudioLE Yes, the general idea would be to handle any metadata, including geolocation using the photoprism and not have to deal with the image itself. My solution was obviously a more general use case solution.
@lastzero
Yes, that's exactly the kind of thing I would expect from a plugin eco-system. I will take a look at the REST API.