Geo tagged photo in image widget

Hope you all are Good!

1. What is the general goal of the feature?
As in modern days, mobile phone cameras can do many things like capture images, can be used as a video camera also as an android phone setting is getting update each year they are providing more support in the android phone.
There is one more feature that is providing by an android phone in camera and that is able to get a geotagged photo. Infield during data collection, a geotagged photo can be helpful to analyze photos with a timeline as well as when geopoint is unable to get location due to bad weather.

2. What are some example use cases for this feature?
In fieldwork, there might be few surveys where the survey has been started to collect data for mapping and listing of forest/trees/house in these cases we also asked to take a photo of places so if we have geotagged photo than we can use QGIS software to see a timeline of geotagged photo with the location. Here, In the QGIS map, we will have photos and we can visualize photos with geolocation as well.

3. What can you contribute to making this feature a reality?
I can test forms and give input, happy to test geotagged photos on QGIS as well.

Stay home, stay safe.


As far as I understand it if you're using the Image widget then when you hit "Take Picture" you'll be taken to whatever the default camera app on your phone is. As long as that app supports photo geotagging (the stock Android camera app and Google Camera certainly do) then the images should have geotags included. Have you tried this and it isn't working?

when geopoint is unable to get location due to bad weather

The next version of Collect (1.28) will use a more comprehensive location lookup so it's unlikely that the camera would be able to access a location if the geo point widget wasn't able to.

I just tested this with Collect v1.28.0 Beta 1, Pixel 3a running Android 10, and ODK Central v1.0

If I take a picture inside the survey. And then I look at the image I don't see location data (neither looking on the Android, nor after submitting and downloading the image from Central.

However, if I open my camera app and take a picture and then look at that file on Android, I do see location data. But, if I select that image inside a survey (instead of capturing a new one), and submit it, the image downloaded from Central does not appear to have location exif data.

1 Like

If I take a picture inside the survey. And then I look at the image I don't see location data

A Collect expert (@ln? @Grzesiek2010?) can probably confirm, but I dont see that CameraUtils.savePhoto() persists any of this EXIF data, so it is probably getting dropped from the saved imaged file that gets uploaded.


That method is used only in case of selfie widgets (new-front appearance). Then we don't use any external camera app and in this case it's true we capture just an image.

I have just tried a simple image widget from the AllWidgets form and it keeps location data.

@danbjoseph what widget did you use? Normal image widget? With some extra appearances or maybe max-pixels?

1 Like

Thanks for the clarification. So it is an issue that selfie vs regular image widget behave differently wrt capturing location (and timestamp?) EXIF data?

I assume scaling either image - as a consequence of max-pixels - may also drop this data?

Yes as I said we capture selfie images on our own so it's as simple as possible.

Yeah that's why I asked about it.

Hello, I can confirm that EXIF data is removed from images when ODK Collect is rotating or scaling.

These operations require conversion of the image file to a Bitmap object in memory, which is transformed then saved over the existing file without taking care of the EXIF data.

For rotation it is visible in this code and for downscaling here

If there is an interest from the community, my team could contribute an improvement to keep EXIF data when scaling down or rotating the original image with these 2 methods.

1 Like

Hi, yes the Image widget can sometimes get geotagged photos, but our users are facing a lot of issues with it because the user experience is not consistent. It depends on ODK collect and camera app permissions, camera app support for Location tags, and Android version.

It's not a Collect bug, but it can impact all the Collect users who are making use of the Location tag in images taken with Collect.

In another post, I suggested to improve the Image widget with an option to let users add Location data to photos taken with Collect, independently of the camera app.

And the rotation/scaling code of Collect needs also to be improved (see my post in this thread) as it is currently removing EXIF tags from photos.

Looking forward to get some feedback from users and developers on that.

This seems like a clear win to me. The current behavior seems accidental so I think this is really a bug fix. A PR would be very much welcome! You should find everything you need to get started at and you can join the #collect-code channel in Slack if you have any questions.

This is intriguing. I think the best way to start is to create a new features thread with a user experience proposal.

Hi, thanks for your feedback.

We are going to work on the scale/rotation fix and will submit the PR when we have something reasonable.

For the new feature my team is already working on a spike, I will share the UX after review.


An interjection here based on my use of Collect and camera apps - not aimed at being negative, but a word of caution...

In the past, by default I included geotags with images that I took when I was out in the field, so that if I needed to use them later I could import them to QGIS. I found that sometimes the location data was inaccurate - a number of images clustered together when they were 100s of metres apart. I eventually decided that I had probably taken the image before the camera app had a 'good' fix on my location (assuming it took the last known location?).

I stopped doing that and usually ran a GPS track while I was in the field and used Geosetter to geolocate images when I got back. The down side of that was battery life - running a track for 8 hours is a big ask, especially when it is cold. Keeping a battery bank going in the wet becomes challenging...

So now I use Collect for all fieldwork and in addition to my context-specific forms have a very simple form that just has Location, Image, Notes. Which works as a 'backstop' for any situation where I need to record something that I maybe wasn't expecting to.

This is a long way round (as usual for me) for exploring the potential downside of relying on geotags within the image, rather than using a geopoint from Collect. I am all in favour of 'fewer steps to get your data', but the advantage of using a geopoint widget as well as the Image is that you can be certain of the accuracy - and you could even relocate the image to the correct place if your GPS is dodgy (e.g. in dense tree cover, inside a building). It is also simple to import the data into your GIS. In QGIS I just need to add a delimited text layer and hey-presto my images can be viewed in situ [for QGIS: in the layer properties, set the form attributes for the image field to 'attachment' and give it the path to the images' folder - then you can use the identify tool to open the record form and view the image and the associated record] - obviously I'd need to add the relevant EXIF tags if I want the image to be genuinely getotagged).

Is there are situation where a camera app could provide an accurate location but a geopoint can't - maybe that would give you rogue data, if you assume that the EXIF data is correct but the phone hasn't got an accurate fix?

Apologies if this sounds like I'm trying to discourage innovation, but please bear in mind that some enumerators may not behave in the required manner to gather quality data (speaking from painful experience). If the enumerator assumes that the image will be geotagged but doesn't appreciate that it is rarely 'instant' location fix, you might end up with poor data, without being able to mitigate that. If you had a way of preventing an image being recorded until the location was fixed, that might be good (probably way beyond Collect's pay-grade?). Granted, new phones are much quicker at getting a GPS fix, but again, don't assume that all users of ODK are using the latest equipment (me for one).

This is what I would imagine is a 'safer' way to solve the feature request: add an option to process images in Collect to add geopoint data (if the form includes it) when the image is saved or geopoint collected - l think there are a few case-specific scenarios / pitfalls that would need to be thought through, but this may be a different way of getting a similar result, but always having an accuracy component (i.e. quality assurance) to your dataset.


Thanks to @MyName and @racetiger, as of Collect v1.29, EXIF data should continue to be available when images are scaled or rotated.

If you find other cases that aren't handled, please start a new thread. @MyName has also started a new feature thread about adding a location from Collect to captured images independently of the camera app. @seewhy this might interest you.