-
-
Notifications
You must be signed in to change notification settings - Fork 303
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
Extract and store GPS data #2
Comments
Indeed this is not saved... We can easily make a migration to add the required column and save the desired data. About the geospacial fields, I had a quick look. I agree that using decimal would be a solution. As for the JSON part, it is possible with Laravel: https://www.qcode.in/use-mysql-json-field-in-laravel/ It also seems to me that Lucene can be easily included: https://packagist.org/packages/nqxcode/laravel-lucene-search :) |
All good points. PostgreSQL has had geospatial support for a while now as an extension and apparently so does SQLite. However, I haven't been able to find a library that supports all of them, at best only MySQL and PostgreSQL and it'd still be a bit iffy because it'd require people to install extra stuff. The JSON handling is already builtin to Eloquent it seems but after thinking about it you're right, it's a bit of overkill right now. I'll stick to the basic DECIMAL fields and if at some point in the future it makes sense to move the metadata to another format we can tackle the issue then. |
@hermzz you will need to update |
Hi, Any news concerning this request? Probably you can use https://fr.piwigo.org/ext/extension_view.php?eid=122 by example so that you extract Exif GPS data & maybe add a map.. |
@hermzz was working on it. We haven't heard from him for a while unfortunately. |
I'd like to be able to display GPS data along with the rest of the photo info. It looks like there's already some code to extract the GPS data from the EXIF tags in app/Photo.php but it isn't stored or displayed anywhere (as far as I can see).
Ideally I'd like to store Longitude, Latitude, Elevation, and a textual description (eg: London, UK).
The question is, how do store the longitude/latitude? Both MySQL and MariaDB have geospatial fields in their newer versions (MySQL 8+ and MariaDB 10.2+ at least) and from a bit of quick research those seems like fairly extended releases (the LTS for both is 8.0 and 10.3 respectively). AWS provides both of those versions and so does Homestead.
Alternatively, we could store all them as
DECIMAL
values, but this comes with the downside of not being able to use all the fancy geospatial query functionality, like being able to find all photos within a specific range. At least not without using a third-party search engine like ElasticSearch or Lucene.A final and more aggressive alternative (and perhaps an idea for another day) is to move all photo metadata to a JSON format and use the builtin MySQL/MariaDB JSON functions to process the data. This would provide the flexibility in the future to add metadata without creating additional fields in the photos table.
The text was updated successfully, but these errors were encountered: