OpenStreetMap

Using exif based geotag photos from phone to JOSM is not always reliable

Posted by maning on 22 October 2012 in English (English)

I just did a test on using the exif information from geotagged photos for mapping. This time, I set my phone (Samsung GT-S5300) to add the location in the exif data. Using the same phone, I also logged my tracks as a background process with GPSLogger.

The image below shows the image location in JOSM using the exif's lat/lon data. The GPS trace is also shown. Notice that the photos are arranged in a grid-like manner and does not entirely correspond to my tracks.

Using exif

Using the traditional photo to gps position correlation in JOSM, the photo location is way more accurate.

Correlate with traces

Just to test if this is a JOSM bug, I tried reading the photo's exif tag in QGIS using the Photo2shape plugin and it shows the same grid-like position in the first image.

Location: Quiapo, Third District, Manila, Metro Manila, 1002, Philippines

Comment from Harry Wood on 22 October 2012 at 11:34

Interesting. Good that you've tested with QGIS too, so we can say that this definitely nothing to do with JOSM EXIF handling.

Your phone, Samsung GT-S5300, is not writing enough digits of precision into the EXIF tags... which is silly isn't it? Are they trying to save space? I wonder how many phones have that kind of problem.

Another problem I think I see with my ZTE android phone, is that it takes a while to "warm up" the GPS, so if you ask it to geotag photos, it gets a much better more accurate location if you are running a trace or something else using the GPS in the background.

Hide this comment

Comment from maning on 22 October 2012 at 12:10

What's even more weird is when I checked the details of the photo in the phone, it reports the lat/lon to up to 15 decimals! Way too much IMO.

Hide this comment

Comment from Sanderd17 on 22 October 2012 at 12:22

When I create tracklogs and pictures via the OSMtracker app, and I import the track and the pictures in JOSM, I always see two buttons.

One is from the EXIF info, another is a link created by the GPX track. Those locations are always a bit off.

So there are certainly more phones that have the problem. But do we really care? We normally don't stand on the place of the feature itself to take a picture. We normally take a picture from a further distance.

Hide this comment

Comment from Harry Wood on 25 October 2012 at 10:48

These days I mostly map without even using GPS. Take notes and photos and use bing imagery (great resolution in London). But in situations where GPS is needed, I do tend use my camera as a kind of waypointing tool, so for example if I'm walking along a footpath that crosses a river, I'll take one photo as I approach the bridge, to help me see what this thing is, and then as I cross the middle of the river, I'll fire a photo of the river. This can be blurry as hell. It doesn't matter. It's purely for the purposes of having a precise position of the middle of the bridge at the point here the river crosses. ...obviously that kind of use doesn't work too well if your phone is buggering up precision in the EXIF data!

Hide this comment

Comment from Rhubarb on 28 October 2012 at 13:41

I've also experienced this myself with a Nokia N9 phone running Meego. I also take tracklogs (so I can make a gpx track) while taking photos.

The exif gps tags on the photos were innaccurate, and looked like the phone just chopped a few digits off the cooridates.

Anyway, I don't bother to use JOSM to fix this (though I do use JOSM to map). I just use exiftool (you can find this inside the package perl-image-exiftool in arch linux, similar name in debian / ubuntu).

If you put the gpx file in a directory that's full of your photos of the survey, just run: $ exiftool -geotag *.gpx . in the directory, and it'll automagically compare the time the photo was taken to the gpx track, and correlate the gpx track's coordinates into the photo's exif data.

exiftool will create _original backups of your photos, this behaviour can be easily changed by adding in a few more switches to exiftool if need be.

The great thing about what I've done above, is that it leaves other exif tags alone, so for example my Nokia N9 records the direction my phone was facing when the photo was taken. - Making it easy to work out which side of the path street furniture etc was when using JOSM.

My only worry with this method is if the phone's clock does not equal the GPS's clock. If they don't match, you'll have to add or subtract a time offset, which can be done with exiftool (or perhaps more easily with JOSM in this case).

Aside, an old samsung B2700 "dumb" phone I have has big issues with the exif created date tag during the months of October, November, and December. It seems if the month has 2 digits, the exif tag goes crazy. My solution was to write up a simple bash script with help from exiftool in linux that grabs the file creation date, and overwrites the exif creation date tag with that.

It'd be so much nicer if phones actually just saved all the significant digits of the GPS lock into the exif tag!

Hide this comment

Comment from Rhubarb on 28 October 2012 at 13:45

Oops, just getting used to Markdown, should've made that exiftool command be easily readable:-

$ exiftool -geotag *.gpx .
Hide this comment

Leave a comment

Parsed with Markdown

  • Headings

    # Heading
    ## Subheading

  • Unordered list

    * First item
    * Second item

  • Ordered list

    1. First item
    2. Second item

  • Link

    [Text](URL)
  • Image

    ![Alt text](URL)

Login to leave a comment