OpenStreetMap

Some more Android hackery for efficent mobile surveys

Posted by SimonPoole on 29 August 2013 in English (English)

You may have noticed that the 0.9 Vespucci release (see http://code.google.com/p/osmeditor4android/downloads/list and on the google Play Store rsn) has an experimental geo-referenced photograph overlay: Vespucci 0.9 on a tablett

this is already very helpful, you can walk around surveying then sit down in peace and quite, enter the information that you have collected and upload right there. Vespucci does not support taking photographs directly (yet?) so I'm doing this with osmtracker. Now and then it isn't really clear in which direction the photograph was taken and it would be helpful to have that information available too.

Most mobile phones today can measure magnetic fileds and have what used to be called a compass :-), however there don't seem to be any (or at least none that are well known) apps that add this information to the picture EXIF information (there are a couple of Android "features" that need to worked around to be able to do this). In any case I hacked together a modified version of osmtracker that actually does this today and made the necessary changes to be able to read the information in Vespucci and this is the result: Vespucci with photograph take due east the rotated camera icon is pointing due east in the direction I took the photograph (of some grass so I'm not showing -that- here :-)).

There is still some work to do to make the actual photographing more robust, for example rotating the mobile phone into landscape mode will mess the compass reading up in the current modified osmtracker version, but the concept seems to have some merit.

Comment from Stalfur on 29 August 2013 at 15:48

Interesting feature, was unaware mobile phones had a compass

Hide this comment

Comment from SimonPoole on 29 August 2013 at 22:37

Well in reality these typically do measure the mangetic field on three axis, and are a bit more complicated than a conventional compass. But the net effect is that you can determine which direction you were pointing the phone camera. There are a couple of "ifs" like for example that you should naturally calibrate the sensors before you set off on a mapping tour and other things you may have to take in to account to get reasonable results, but in principle it works.

Hide this comment

Comment from Rhubarb on 30 August 2013 at 10:50

The Nokia n9 mobile phone also records the compass bearing for all photos it takes. But the GPS exif tags aren't accurate, unless of course you also record a gpx track on the phone as well - then sync up the photos with the gpx track by running (in Linux): exiftool -geotag *.gpx . JOSM supports the import of photos with exif gps and compass bearing tags :)

Hide this comment

Comment from SimonPoole on 30 August 2013 at 11:54

The main issue is that for the most mainstream mobile device category (Android with roughly 80% global maket share) none, well at least none that I know of, of the surveying apps add the information. If I can get the code I added to osmtracker to work stable enough for general use I will make it available.

Hide this comment

Comment from StephaneP on 2 September 2013 at 07:01

I hope that the new app from Cyanogenmod, Focal, will include the direction in the exif tag.

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