Skip to content
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

GPS attaching coordinates from device instead of photo #2306

Closed
kvibber opened this issue Dec 6, 2024 · 8 comments
Closed

GPS attaching coordinates from device instead of photo #2306

kvibber opened this issue Dec 6, 2024 · 8 comments

Comments

@kvibber
Copy link
Contributor

kvibber commented Dec 6, 2024

Apparently there is still an issue with GPS coordinates being attached from the device instead of from the photo. (I'd thought since the ones I saw earlier were all older, it might have been fixed already, so I pulled it out of the description for #2304).

I uploaded two photos yesterday that ended up on Panoramax with the coordinates of the location where I was when I uploaded them. Both photos have GPS metadata. I took both photos yesterday on a Pixel 5, cropped them and blocked out license plates on the local copies on my phone using Google Photos, and uploaded them through MapComplete running on Vivaldi (still on my phone). The edited photos still have the GPS data included, so presumably MapComplete should have been able to use it. (I've already reported the specific photos through Panoramax.)

Even if it couldn't access GPS from the photo, wouldn't it make more sense to attach coordinates from the POI/way being edited instead of the current device location?

@kvibber
Copy link
Contributor Author

kvibber commented Dec 6, 2024

Affected photos attached here:
Photos with GPS.zip

@thibaultmol
Copy link
Collaborator

Yeah, this is related to the other issue.
TLDR: some android phones seem to scrape out gps exif data when uploading if the the browser shows an 'image picker'.
it's unclear why this is.

if the browsers open a file picker (or if the user manually switches from the image picker to the file picker) the file will stay untouched and the gps exif data will stay.

What's happening here is something behind the scenes (which is not exposed to the user..... leading to exactly this kind of confusion that I was afraid of.... where mapcomplete is "falling back" on gps coordinates of the device if it notices that they are indeed being stripped. This should only happen if you're within x amount of meters from the obejct you're adding to.

My solution is to switch to a file picker instead of an image picker.

You can test this yourself, if you follow my workaround on that issue: #2202 (comment)

@kvibber
Copy link
Contributor Author

kvibber commented Dec 6, 2024

Aha! Yeah, that's apparently a known issue with the image picker I'm using...which I commented on myself back in July and forgot about (oops).

FossifyOrg/Gallery#218

I'll make sure I use the file-picker workaround next time I upload from my phone.

Though I do think it would make more sense to fall back to coordinates from the POI or way being edited instead of from the device.

@thibaultmol
Copy link
Collaborator

depends. if you're uploading multiple images, they would all be on the same location, which isn't ideal.

part of me is hoping that (somehow) when the webapp is packaged as an android app. the gps coordinates somehow don't get stripped. but i have no idea

@kvibber
Copy link
Contributor Author

kvibber commented Dec 6, 2024

Maybe, but I think it would still be better to have them all tagged somewhere within a few meters, instead of all the way across town.

@thibaultmol
Copy link
Collaborator

we'll wait for @pietervdvn to respond, it shouldn't be that far. it was much shorter, but don't remember how short. But that's what he told me in dm's at some point

@kvibber
Copy link
Contributor Author

kvibber commented Dec 6, 2024

Well, these two were a little over 1 kilometer from where I uploaded them. Two more from a few weeks ago were off by several km.

@pietervdvn
Copy link
Owner

The main issue here is:

  • assuming images are uploaded immediately
  • assuming a GPS coordinate is present.

The second breaks because of #2202 . To mitigate assumption 1: if the GPS-location is >150m away from the photographed object, we use the coordinate of the object instead.

pietervdvn added a commit that referenced this issue Dec 11, 2024
pietervdvn added a commit that referenced this issue Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants