Sufficient GPX-format for proper automated osm-contribution?

Hey guys,

I’m planning to contribute to the OSM-Project with AndNav, my Android Navigation Application ( )

I’ll be using automated uploading of the route the user has driven (just from location A to B).
As this is my first day with osm I’m not sure if the gpx format I have put together is sufficient/correct: (Note: the user won’t interact with this data, so there will be no handmade description or similar stuff.)

<?xml version="1.0" encoding="utf-8"?>
        <name>Route to 4706 Mangum Road, 20740 College Park, MD</name>
        <src>Track was automatically recorded by AndNav, an Android Navigation System.</src>

Best Regards,
Nicolas Gramlich

I just grabbed this piece from a trace someone uploaded. I see your are missing a few > and your are uploading trackpoints as waypoints. Also it would be nice to add hdop, so someone could filter bad gps signal.





Here is what skywave posted + somethings. note that there are trksegs which are great if you want to break up your track for some reason, e.g. powerdown, lots of points on same place, or anonimization.

if you can addvdop/hdop/pdop it would be great, because that information is really helpful if you want to do automatic post processing of gpx logs. Other things that would be interesting would be to know the phone type that was used to make the tracks, so you get somekind of feeling of the quality of the GPS hardware.

<gpx creator="" version="1.1" xsi:schemaLocation="">
 <name>ACTIVE LOG130410</name>
    <trkpt lat="48.151837" lon="12.839724">
      <ele>450.190</ele>  <time>2008-09-20T11:04:10Z</time>
    <trkpt lat="48.151565" lon="12.839661">
    <trkpt lat="48.150799" lon="12.839445">
      <ele>453.939</ele> <time>2008-09-20T11:04:20Z</time>
    <trkpt lat="48.150699" lon="12.829445">

Thx guys, that helped me :slight_smile:

so which tag to put the device-name to? Is there a list with IDs or sth. ?

According to the amount of points, is ‘the more the better’ or just like ‘every 20 meters’ ?

One thing I thought about is the password using the automatic upload. As Android is ~Java it can be disassembled and the password would become visible as clear text. Is there a possibility to lock the password with my account, so it cannot be changed anymore?
Another possibility would be to automatically create a new account for each user of my app, but that would lead to a loss of privacy. (Note that I do not want the user to be confronted with such stuff).

I’ll see if I can make that vdop/hdop/pdop thing, as the Android-API abstracts/simplifies a lot.

Best Regards,


Btw this is a working (!) example for gpx v1.1:

<?xml version="1.0"?>
<gpx version="1.1" creator="AndNav - - Android Navigation System" xmlns:xsi="" xmlns="" xsi:schemaLocation="">
            <trkpt lat="49.472767" lon="8.654174">
            <trkpt lat="49.472797" lon="8.654102">
            <trkpt lat="49.472802" lon="8.654185">

Additionally I will post the code for creating/logging/submitting tracks to OSM for the Android platform soon.


Just for reference we are talking about the GPX schema & specs

It might be hard to get such a log in, but you can try to file a ticket on , but I don’t think there is any way of doing that automatically at the moment.

So I found time to upload my code for the Android-Platform:


Its just 4 lines of code (and coping the java-files) to enrich an existing Android-GPS-Application with contribution to the OpenStreetMap-Project.

Best Regards,
Nicolas Gramlich (with a new separate account now)

Great! Lets hope people use it.

Hello Nicolas,

your app look very usable! I have some related questions and ideas…

Does AndNav also work with OSM as MAP?

Does it work with OpenMoko / qtopia?

If a user does not want to create a account, the traces should be uploaded to anonymously, checked for validity and uploaded to OSM from there!

Before the app uploads a trace the user should be asked!

Bad GPS-Data (less than X satelites in sight, bad hdop or vdop values) should be filtered out before uploading.
My gpsbabel-filter: gpsbabel -i gpx -f infile.gpx -x discard,sat=6 -x discard,hdop=3,vdop=10,hdopandvdop -x simplify,crosstrack,error=0.0001k -o gpx -F outfile.gpx
“crosstrack” is not always a good idea…
A automatic system should be conservative: sat=5 hdop=10 vdop=20

Add an option to save to flash instead of uploading!

(Add an option to disable filtering when saving to flash!)

(In the comment line at the OSM-trace-upload it would be helpful to include start and end coordinate.)


Hi there :slight_smile:

First of all, see a video of my current work (2 days old) here:

  1. Soon, thats why I am coding that OpenStreetMapView.

  2. Nope just Android (for now)

  3. Currently all users contribute to a single account, but (at least in AndNav) I’ll give the user the possibility to choose a separate account. So advanced users can modify the maps afterwards.

  4. User will be asked on the very first start on AndNav, describing the PROs and inexisting CONs of contributing to OSM.

  5. I’ve queried the Google Android Groups twice with a question for hdop/vdop, … but no answer so far :frowning:

  6. I will, but its not on the top of my todo-list.

  7. Could you specify the tag to put this to (I’m not yet that familiar with details of the gpx-format)

  8. I love the smilies of this board :smiley:

Best Regards,
Nicolas Gramlich

I watchd your video and just wanted to say it looks very good, and give you one feature request from Google maps mobile, the zoom function is usually activated with the phone navgiation joystick button, which will is important in this description:

When you press zoom it won’t zoom in directly but wait 0.5seconds, during that time it displays a small rectangle highlighting the area you are zooming to. This delay allows you to move that rectangle around, so you can choose an area to zoom in to, you can also press zoom one more time and get a smaller rectangle. This is very usefull.

I’ve used AndNav2 to add POIs to OSM by having AndNav automatically upload them under my own account. However, for the past weeks I’m only getting upload errors (“Error: POI could not be added”). Is this a bug or am I doing something wrong?

BTW, thanks Nicolas for the great app!

Hi Danilo,

POI-Adding is fixed an will be in the next version.

Best Regards,