[OSM-dev] Thoughts on an enhanced GPX api

Ævar Arnfjörð Bjarmason avarab at gmail.com
Tue Jul 28 11:33:23 BST 2009


On Tue, Jul 28, 2009 at 9:04 AM, René Affourtit<raffourtit at gmail.com> wrote:
> Sorry to break the threading

I can break threading too!

> So when a junction is reconstructed a local user can place a bounding
> box over that junction and all GPS points in that box are marked as
> outdated (or deleted, or whatever). Maybe some extra safety needs to
> be made by only allowing users active in the specific area to do this,
> or only users who upload traces.

The problem with this is that it's a broken solution to an already
limited system. We shouldn't have to /remove/ GPS tracks depending on
age, but rather have the ability to mark segments or points of them as
trusted (amongst other things).

The current schema that we have is:

* User uploads a GPX track
* Nobody can delete or edit that GPX track (e.g. add additional
metadata / delete useless sections) except the user
* All GPX tracks are parsed for their points and you can download this
giant point cloud given a bbox

(see http://wiki.openstreetmap.org/wiki/0.6#GPS_Traces)

One problem with this is - as has been observed - that the data gets
less useful for everyone as more traces are uploaded. We can devise
hacky solutions to this such as not serving old traces via the API.
But that's just a lame workaround which'll remove a lot of valid
tracesi E.g. I've surveyed footways that have been there for
centuries, and probably aren't going anywhere soon.

What if the GPX API worked like this instead:

* User uploads a GPX track

Like now.

* All the data is losslessly inserted into the database

This means that we can get waypoint/segment/time/ele/whatever data out
again. It would probably be simplest to do this by having additional
tables equivalent to the node/way tables where a GPX trkseg would be a
way, waypoints nodes and so on.

* The data is versioned, and anyone can edit it

I have a lot of GPX tracks that could be improved, e.g. by deleting
point clouds. I'd like to edit them using normal OSM tools, have those
edits versioned (so they can be rolled back), and have other users do
those fixes for me. Just like with the OSM data I upload.

* Users can download GPX traces:

** As a point cloud within a bbox

Like now.

** As "all tracks within bbox"

So that tracks can be distinguished (and hidden) and their metadata
read & edited.

** Using other methods

E.g. "all tracks by user"


Then, instead of deleting traces they (or their segments/points) could
simply be tagged indicating their subjective quality using a free-form
tagging system. You could then just set your editor to ignore those
traces.

Free-form tags could obviously be used for other purposes, e.g.
marking the trace as surveyed with a given GPS model.

Implementing this would require new tables in the database, optional
changes to all editors (since they could keep using /trackpoints), and
new database tables to track GPX data and its history.

How does this sound? I'm pretty happy with the 0.6 API except for the
GPS bits. I'd like to make GPX a first-class object in OSM and would
be willing to hack the rails port to make that happen (when I have
time). Is anyone else interested in being able to do what I've
described above?




More information about the dev mailing list