You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2008-09-21 16:45:37

andnav
Member
Registered: 2008-09-21
Posts: 2

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 ( http://www.andnav.org )

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"?>
<gpx
    version="1.1"
    creator="andnav">
    <trk>
        <name>Route to 4706 Mangum Road, 20740 College Park, MD</name>
        <src>Track was automatically recorded by AndNav, an Android Navigation System.</src>
        <trkpt>
            <wpt
                lat="-64.12345"
                lon="-128.12345">
                <time>2008-09-20T19:05Z</time>
            </wpt>
            <wpt
                lat="-64.12347"
                lon="-128.12347">
                <time>2008-09-20T19:06Z</time>
            </wpt>
        </trkpt>
    </trk>
</gpx>

Best Regards,
Nicolas Gramlich

Offline

#2 2008-09-21 17:45:51

Skywave
Member
Registered: 2007-11-13
Posts: 91

Re: Sufficient GPX-format for proper automated osm-contribution?

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.
<gpx creator="" version="1.1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">

<trk>
<name>ACTIVE LOG130410</name>

<trkseg>

<trkpt lat="48.151837" lon="12.839724">
<ele>450.190</ele>
<time>2008-09-20T11:04:10Z</time>
</trkpt>

<trkpt lat="48.151565" lon="12.839661">
<ele>450.374</ele>
<time>2008-09-20T11:04:13Z</time>
</trkpt>

<trkpt lat="48.150799" lon="12.839445">
<ele>453.939</ele>
<time>2008-09-20T11:04:20Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>

Offline

#3 2008-09-21 21:44:11

emj
Member
From: .se (59.3N17.99E) 0735969076
Registered: 2006-06-18
Posts: 949

Re: Sufficient GPX-format for proper automated osm-contribution?

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="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<trk>
 <name>ACTIVE LOG130410</name>
 <trkseg>
    <trkpt lat="48.151837" lon="12.839724">
      <ele>450.190</ele>  <time>2008-09-20T11:04:10Z</time>
    </trkpt>
    <trkpt lat="48.151565" lon="12.839661">
      <ele>450.374</ele><time>2008-09-20T11:04:13Z</time>
    </trkpt>
  </trkseg>
  <trkseg>
    <trkpt lat="48.150799" lon="12.839445">
      <ele>453.939</ele> <time>2008-09-20T11:04:20Z</time>
    </trkpt>
    <trkpt lat="48.150699" lon="12.829445">
      <ele>553.939</ele><time>2008-09-20T11:04:40Z</time>
    </trkpt>
 </trkseg>
</trk>
</gpx>

Last edited by emj (2008-09-21 21:50:22)

Offline

#4 2008-09-21 22:34:46

andnav
Member
Registered: 2008-09-21
Posts: 2

Re: Sufficient GPX-format for proper automated osm-contribution?

Thx guys, that helped me 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,
Nicolas

Update:

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

<?xml version="1.0"?>
<gpx version="1.1" creator="AndNav - http://www.andnav.org - Android Navigation System" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
    <time>2008-09-22T00:46:20Z</time>
    <trk>
    <name>plusminus_1222044380595-1222044380684</name>
        <trkseg>
            <trkpt lat="49.472767" lon="8.654174">
                <time>2008-09-22T00:46:20Z</time>
            </trkpt>
            <trkpt lat="49.472797" lon="8.654102">
                <time>2008-09-22T00:46:35Z</time>
            </trkpt>
            <trkpt lat="49.472802" lon="8.654185">
                <time>2008-09-22T00:46:50Z</time>
            </trkpt>
        </trkseg>
    </trk>
</gpx>

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

Regards,
Nicolas

Last edited by andnav (2008-09-22 05:30:54)

Offline

#5 2008-09-22 07:07:09

emj
Member
From: .se (59.3N17.99E) 0735969076
Registered: 2006-06-18
Posts: 949

Re: Sufficient GPX-format for proper automated osm-contribution?

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 http://trac.openstreetmap.org , but I don't think there is any way of doing that automatically at the moment.

Offline

#6 2008-09-23 05:32:00

plusminus
Member
Registered: 2008-09-22
Posts: 9

Re: Sufficient GPX-format for proper automated osm-contribution?

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

> http://www.anddev.org/openstreetmap_and … t2902.html

Result/Proof:
osmupload_success.png

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)

Offline

#7 2008-09-23 08:27:40

emj
Member
From: .se (59.3N17.99E) 0735969076
Registered: 2006-06-18
Posts: 949

Re: Sufficient GPX-format for proper automated osm-contribution?

Great! Lets hope people use it.

Offline

#8 2008-09-25 15:43:24

phobie
Member
From: Lübeck
Registered: 2008-09-25
Posts: 10

Re: Sufficient GPX-format for proper automated osm-contribution?

Hello Nicolas,

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

1.
Does AndNav also work with OSM as MAP?

2.
Does it work with OpenMoko / qtopia?

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

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

5.
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

6.
Add an option to save to flash instead of uploading!

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

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

Regards
Per

Last edited by phobie (2008-09-25 15:49:53)

Offline

#9 2008-10-01 04:23:34

plusminus
Member
Registered: 2008-09-22
Posts: 9

Re: Sufficient GPX-format for proper automated osm-contribution?

Hi there smile

First of all, see a video of my current work (2 days old) here: http://www.youtube.com/watch?v=sq8fq4d-seA

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 sad

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

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

9. I love the smilies of this board big_smile

Best Regards,
Nicolas Gramlich

phobie wrote:

Hello Nicolas,

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

1. Does AndNav also work with OSM as MAP?

2. Does it work with OpenMoko / qtopia?

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

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

5. 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

6. Add an option to save to flash instead of uploading!

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

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

Regards
Per

Offline

#10 2008-10-01 11:58:34

emj
Member
From: .se (59.3N17.99E) 0735969076
Registered: 2006-06-18
Posts: 949

Re: Sufficient GPX-format for proper automated osm-contribution?

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.

Offline

#11 2009-05-30 11:29:55

Danilo Diogo
Member
Registered: 2009-05-30
Posts: 2

Re: Sufficient GPX-format for proper automated osm-contribution?

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!

Offline

#12 2009-06-02 17:21:43

Nicolas Gramlich
Member
Registered: 2009-06-02
Posts: 5

Re: Sufficient GPX-format for proper automated osm-contribution?

Hi Danilo,

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

Best Regards,
Nicolas

Offline

Board footer

Powered by FluxBB