Hacker News new | ask | show | jobs
by erksa 772 days ago
This is close to an actual need I've managed to create for myself.

I do photography and I store those I want to share on nextcloud. In my selection and export process all metadata etc is stripped. But I realized too late that it also stripped out the geo-coordinates. No problem adding that in, but still have a laaarge amount of photos without geolocation data.

I'm too lazy to re-export all the older ones, so being able to run something like this on them would be perfect. I would be satisfied with a general area, roughly hitting the province/state its taken in. It doesn't have to be accurate at all, it's more for my own geo grouping.

This site though goes bananas on firefox/mac. Flickering and font adjustments..

2 comments

> I'm too lazy to re-export all the older ones, so being able to run something like this on them would be perfect. I would be satisfied with a general area, roughly hitting the province/state its taken in. It doesn't have to be accurate at all, it's more for my own geo grouping.

I don't think this is even close to being accurate to be used in this way, out of ~10 images I uploaded it got one "correct" (right country, wrong city). Unless you want all your images to geo-tagged "Somewhere, US", probably better to re-export/re-import with your original metadata.

That's fair. I couldn't even get this to work, so not in particular looking at this implementation. I just literally was thinking of if this would be viable or not as an approach, so it was fun to see something that tries to match the bill!
If you still have the original photos, maybe you can write a script to run both the originals and exports against a perceptual hash (so as to easily identify the correct original) and then just update the JPEG EXIF data of the exports?

https://github.com/JohannesBuchner/imagehash

Depending on specific formats, you should be able to read and edit metadata without having to reprocess the images. If the exports are named similarly to the originals, you don't even need to hash them.