CaptainSpam / geohashdroid

A Geohashing app for Android devices
Other
31 stars 6 forks source link

Can't upload two different photos from the app #80

Closed quassnoi closed 3 years ago

quassnoi commented 3 years ago

When I try to upload two different photos (two locations not far from each other in the same graticule, and two different descriptions), the app creates two versions of the same photo instead.

In addition, the photos have different coordinates, but the same coordinates are posted as a description.

See the history here: https://geohashing.site/index.php?title=2021-09-18_26_-80&action=history

When posting two different photos, I would rather expect two different files created, not two versions of the same file.

CaptainSpam commented 3 years ago

Dang. That came up in testing, and I thought I fixed it. Apparently I missed something. I'll take a look.

CaptainSpam commented 3 years ago

Got it. Looks like the problem was that the thing I was using to make all the image filenames unique wasn't working the way I thought it would, meaning that for a given expedition and user it was always making the same name and kept overwriting the previous images. I just rolled out a new version that should take care of that in the future. It's live on Github now, and will show up in the Play Store whenever they get to it.

Oh, and just in case you wanted to grab it, the original file you uploaded (before it got replaced) is still in that image's history on the wiki (https://geohashing.site/images/archive/8/85/20210918195121%212021-09-18_26_-80_quassnoi_1631983832000.jpg).

And I'm also looking into finding a way to make sure you can correctly rotate pictures before posting. But that's another issue. :-)

quassnoi commented 3 years ago

Thanks!

It looks though like the image had wrong coordinates burned into it. There are the same as in the first one, but they should be about 100m apart. I'm not sure if it's my phone's fault or the app's fault though. Is there any way to tell that?

CaptainSpam commented 3 years ago

Hm... could you post the original files with all their EXIF data? That might help. The code I've got should try to read from EXIF if there's GPS data embedded in it, falling back to whatever the phone says if it can't. At least I don't think there's anything in the upload code that would somehow mix up the two image locations the way it did with the filenames.

quassnoi commented 3 years ago

Sure,

PXL_20210918_165500533 PXL_20210918_165046744 MP

quassnoi commented 3 years ago

The uploaded images had the same coordinates burned in:

image

image

CaptainSpam commented 3 years ago

Hrm... I'm afraid I can't help you there, both original images look like they've got the same coordinates in them (exiftool is telling me 26°0'45.42"N, 80°7'19.87"W for both). That might just be a GPS accuracy thing.

quassnoi commented 3 years ago

Oh ok then, that looks like Pixel's fault. Thanks for fixing it!