Modify

Opened 12 years ago

Last modified 2 years ago

#7037 new enhancement

[WIP PATCH] Median of gps tracks

Reported by: biff21@… Owned by: Bjoeni
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc: pabs

Description

I suggest a function to show a medium of gps tracks. Sometimes there are so many tracks that it's hard to find a compromise between own gps records and those of other users. So it would nice to get a blured line or a single sharp line representing the sum of all gps tracks. Some options could help to make it more flexible: maximum date of gps tracks (to get rid of old and inaccurate lines), radius for median (way near by other way -> radius small) and so on...

See picture for better imagination.

Attachments (3)

Untitled-2 copy.jpg (124.3 KB ) - added by biff21@… 12 years ago.
example of gps median and time limit
7037v0.1.diff (8.4 KB ) - added by Bjoeni 4 years ago.
merge-sample-uneven.png (8.3 KB ) - added by Bjoeni 3 years ago.

Download all attachments as: .zip

Change History (23)

by biff21@…, 12 years ago

Attachment: Untitled-2 copy.jpg added

example of gps median and time limit

comment:1 by skyper, 12 years ago

#7020 requests the same for osm data ways

comment:2 by stoecker, 12 years ago

Ticket #7020 has been marked as a duplicate of this ticket.

comment:3 by stoecker, 12 years ago

Copy from #7020:
There is some code (written in R) to do the averaging here:

https://github.com/dittaeva/Average-tracks/

There is more info about this code here:

http://wiki.openstreetmap.org/wiki/Average_tracks

There is some proprietary software plus a paper about a more advanced method for doing that here:

http://www.topofusion.com/network.php
http://www.topofusion.com/jcdl-04-trails.pdf

comment:4 by pabs, 12 years ago

Cc: pabs added

comment:5 by bastiK, 12 years ago

When it comes to interpolation and pattern recognition, the human brain is far superior to any algorithm. IMHO, this feature has very limited use. Maybe for a wide region without aerial imagery, where it would be too cumbersome to trace the gps tracks by hand.

comment:6 by pabs, 12 years ago

I guess you are assuming people only submit features to OpenStreetMap based on aerial imagery. I would challenge that assumption and state that I have found such data to be of low quality.

The only ways I submit to OpenStreetMap are from my GPS device. I traverse a way multiple times, usually at least once in each direction. Having this feature would enable me to upload more accurate ways and would be immensely useful. Especially for ways that are not roads or cannot be seen in aerial imagery, this is even more important.

comment:7 by skyper, 12 years ago

Ticket #7035 has been marked as a duplicate of this ticket.

comment:8 by malenki, 12 years ago

Here is a helpful script regarding this issue:
http://www.openstreetmap.org/user/Guttorm%20Flatabø/diary/14964

comment:9 by Don-vip, 11 years ago

Reporter: changed from anonymous to biff21@…

comment:10 by Bjoeni, 4 years ago

Ticket #9004 has been marked as a duplicate of this ticket.

comment:11 by Bjoeni, 4 years ago

Owner: changed from team to Bjoeni
Summary: Median of gps tracks[WIP PATCH] Median of gps tracks

Here's a WIP implementation for averaging OSM ways, inspired by the script by Michiel Faber and Guttorm Flatabø mentioned above (CC0), enhanced for efficiency. Still needs some work though.

by Bjoeni, 4 years ago

Attachment: 7037v0.1.diff added

comment:12 by stoecker, 4 years ago

Hmm, you know that we have a heatmap feature in JOSM for GPX data? Is there anything to that ticket which is not covered by the the heatmap?

Version 0, edited 4 years ago by stoecker (next)

comment:13 by Bjoeni, 4 years ago

That serves different purposes. This patch applies to manually selected OSM ways as suggested in #7020, not GPX layers in general. So you choose two or more ways and get one resulting averaged way.

In my opinion this feature is useful for regions with no usable aerial imagery, but multiple GPX tracks (doesn't matter if downloaded from OSM, your own track e.g. from going back the same way or a combination of both). Also we have regions in OSM where you can still add tens or possibly even hundreds of kilometers of tracks/paths without intersecting other paths.

comment:14 by stoecker, 4 years ago

What's the advantage of manually selecting a track compared to the heatmap?

comment:15 by Bjoeni, 4 years ago

The heatmap only gives you a visual representation, while this gives you an actual way usable for OSM.

See also the comments above:

bastiK

Maybe for a wide region without aerial imagery, where it would be too cumbersome to trace the gps tracks by hand.

pabs

The only ways I submit to OpenStreetMap are from my GPS device. I traverse a way multiple times, usually at least once in each direction. Having this feature would enable me to upload more accurate ways and would be immensely useful. Especially for ways that are not roads or cannot be seen in aerial imagery, this is even more important.

comment:16 by archiewheeler@…, 3 years ago

Hello, I'm currently developing a JOSM plugin for maintaining bus routes. One of its features is producing the average of a collection of GPX tracks, which might be what you're looking for. You can find the plugin here:

https://github.com/archwheeler/bus-route-maintenance/

If you collect all of your tracks as different segments within a single layer, you can produce an average track by going to Data > Average GPX tracks.

I hope this helps, any feedback would be greatly appreciated.

comment:17 by simon04, 3 years ago

@archiewheeler, any reason to not add your plugin to PluginsSource? There's a bunch of plugins which are hosted on GitHub and included this way.

comment:18 by Bjoeni, 3 years ago

@archiwheeler, sorry for the late response and thanks for pointing that out. It works a bit different than the patch I proposed (mine works with already converted OSM ways, yours uses the whole segment). I assume you usually have one segment per bus ride from the tracker?

My idea was to basically allow the user to merge two OSM ways after converting and cutting them, as I usually have one long segment (e.g. when hiking in the middle of nowhere). So I guess both make sense, just different use cases.

Regarding your plugin:

  • When the segments are in opposite directions, I get a StackOverflowError (see issue on github).
  • The start points of the different segments must be nearly at the same position for your plugin, otherwise it looks like this:


(not sure if that's intended, since bus routes should always have the same start/stop, but I thought I'd mention it. That obviously would not work for my use case)

Last edited 3 years ago by Bjoeni (previous) (diff)

by Bjoeni, 3 years ago

Attachment: merge-sample-uneven.png added

in reply to:  18 comment:19 by archiewheeler@…, 3 years ago

Replying to Bjoeni:

@archiwheeler, sorry for the late response and thanks for pointing that out. It works a bit different than the patch I proposed (mine works with already converted OSM ways, yours uses the whole segment). I assume you usually have one segment per bus ride from the tracker?

My idea was to basically allow the user to merge two OSM ways after converting and cutting them, as I usually have one long segment (e.g. when hiking in the middle of nowhere). So I guess both make sense, just different use cases.

Regarding your plugin:

  • When the segments are in opposite directions, I get a StackOverflowError (see issue on github).
  • The start points of the different segments must be nearly at the same position for your plugin, otherwise it looks like this:


(not sure if that's intended, since bus routes should always have the same start/stop, but I thought I'd mention it. That obviously would not work for my use case)

Thanks for the feedback! I've replied to your issue on GitHub. A new option has been added to the plug-in which produces a much more sensible average for your data:

https://user-images.githubusercontent.com/8657895/121527925-db183f00-c9f2-11eb-8f3d-fa32facad25d.png

in reply to:  14 comment:20 by Bjoeni, 2 years ago

Replying to stoecker:

What's the advantage of manually selecting a track compared to the heatmap?

@Dirk, what's your take on this ticket / the WIP patch from comment:11?
Because I won't pursue this any further if it doesn't have any chance of being merged anyways, but I personally think it makes a lot of sense.

  • It provides more functionality than the heatmap (see comment:15) and
  • it serves a different use case than the plugin mentioned by archiewheeler
  • it makes editing much easier and more accurate in certain regions (that are currently not mapped well and/or have no imagery of usable quality)

Also there are three tickets requesting the same thing.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Bjoeni.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from Bjoeni to the specified user.
Next status will be 'needinfo'. The owner will be changed from Bjoeni to biff21@….
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from Bjoeni to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.