Opened 11 years ago

Closed 10 years ago

#8416 closed enhancement (fixed)

allow to filter gpx traces by age

Reported by: richlv Owned by: team
Priority: normal Milestone:
Component: Core Version: tested
Keywords: Cc:


(sorry if this is a dupe, i couldn't find an existing ticket)

for all gpx traces josm downloads, time is known. it would be great if we could filter visible traces by age - for example, in some region roads might have changed enough for old traces to be only of historical interest, not providing any benefit for mapping (and making it harder, actually).

for example, see section in riga where a new roundabout was built (attached screenshot)

another benefit would be filtering out traces w/o timestamps (listed as 1970 already), as they usually are older or of lower quality

Attachments (1)

trace_age.png (87.7 KB ) - added by richlv 11 years ago.

Download all attachments as: .zip

Change History (27)

by richlv, 11 years ago

Attachment: trace_age.png added

comment:1 by skyper, 11 years ago

Type: defectenhancement

comment:2 by akks, 11 years ago

There is a plugin InfoMode that can do the thing (show trackpoint info and hide ttacks older than point). If needed, we can integrate some functionality into core

comment:3 by richlv, 11 years ago

just tried the plugin. it's interesting, but i found it to be pretty hard to use - the only way to get to controls was to hold down left mouse button and aim for the popup, which flickers terribly, and removing multiple traces sort of requires you to know which is the oldest you want to keep (which in the example screenshot is pretty much impossible).

what i'd aim for :

a) a date field to hide all tracks older than that date;
b) a slider to modify date field - if i don't know exact date, i can just play with that until bad traces disappear;
c) extra checkbox to control traces w/o timestamp info;
d) if filtering by usernames could be added, that would be even better :)

comment:4 by akks, 11 years ago

Try holding Shift to avoid jumping popup.
Almost all tracks downloaded from server are anonymous and stripped (no timestamps at all), there is no API to download custom tracks - we can only hide it after downloading the whole mass.

@team: Should the filtering components be in the core on in the plugin?

Last edited 11 years ago by akks (previous) (diff)

comment:5 by richlv, 11 years ago

oh, you have to hold down shift before clicking - tried it the other way around :)
shift doesn't "snap" it to a specific point, though, so you still have to chase the popup sometimes.

as for timestamps - in my case majority of traces are not anonymous (user url can be seen) and they contain timestamps. downloading them separately from the api would be a feature request for the api, but until that appears filtering in josm seems to be just fine (like the individual trace filtering).

for example, try downloading traces around this roundabout :
usernames and timestamps plenty :)

(one open question would be how to filter a trace that might span a large time period because some unit inserted points with incorrect timestamp)

comment:6 by akks, 11 years ago

I will look at the InfoMode popup some time later (Linux system or Win?)

I agree that filtering is essential :) Each track can be shown or hidden, for displaying track parts much more work will be needed, so let us skip it for now.

Last edited 11 years ago by akks (previous) (diff)

comment:7 by richlv, 11 years ago

well, individual traces manually can be filtered already. it's filtering by date that i'd love to see.
parts of traces does not seem too crucial to me, if we can just have some reasonable way to handle traces with weird timestamps, i'll be happy :)

comment:8 by akks, 11 years ago

I feel I can not work with GpxLayer class with 1800 lines. What if we split it into small ones, extracting inner classes into
org.openstreetmap.josm.gui.layer.gpx (like MarkerLayer and GeoImage)?

comment:9 by akks, 11 years ago

In 5715/josm:

see #8416. GpxLayer refactoring: inner classes goes to org.openstreetmap.josm.gui.layer.gpx
Any change of behavior is a bug!

comment:10 by akks, 11 years ago

I have done big and dumb refactoring as preparation. Sorry if anything is broken or ugly :)

comment:11 by akks, 11 years ago

Comment to refactoring: functions confirmAndDownloadAreas( ), importAudio() and nearestPointOnTrack( ) were moved to other classes. GpxLayer itself was not moved because I did not want to break the plugins. (All the SVN plugins compile OK and seem to run correctly without recompilation too)

Last edited 11 years ago by akks (previous) (diff)

comment:12 by akks, 11 years ago

In 5717/josm:

see #8416: allow to filter gpx traces by age (layer context menu, filter dialog)

comment:13 by akks, 11 years ago

There is no automatic filtering so far - you need to open context menu / Filter / press button Select by date

comment:14 by richlv, 11 years ago

note - i really hate trac right now. "Missing or invalid form token. Do you have cookies enabled?" and all my writeup gone.

back to the filter.

that is awesome - huge thanks :)
a few notes.

a) the dialog currently is very confusing - there are buttons that do something on the top, bottom and it all somehow interacts. i'd suggest the following :

  • make "filter by date" a checkbox;
  • make "show selected only" a checkbox;
  • simplify buttons at the bottom to be "ok" and "cancel" (well, and "help" :) )

b) at least with openjdk on linux, some month & date combos may completely hide the last digit in the year - see "time_filter_field" screenshot

c) open filter, filter by date, click cancel. all ok. open filter, click cancel - time filter is gone. probably could be solved by (a)

d) minor - spacing up/down for the explanatory text could be increased :)
see "trace_filter_spacing" screenshot

and again i wanted to say a huge thanks for this feature, it is really awesome. (i'm getting more ideas, like a mode to collapse the window to time period controls only - but for now i can get that by moving the window to the bottom of the screen :) )

in reply to:  14 comment:15 by stoecker, 11 years ago

Replying to richlv:

note - i really hate trac right now. "Missing or invalid form token. Do you have cookies enabled?" and all my writeup gone.

This is not trac specific, but a generic problem of web-based data entry. When something wents wrong text is lost.

For Firefox there is Lazarus plugin, which helps preserve texts. See here for similar functionality for Opera:

comment:16 by richlv, 11 years ago

thanks for the info - some apps (like mediawiki or jira) do allow to retry the operation and preserve the entered text. with classic html apps it is not a problem either, as pressing back will have all the entered content (except passwords) in opera. it's just fancy interfaces that do not implement any safeguards that cause problems :/

but that's offtopic, let's get back to the gpx trace filtering ;)

comment:17 by akks, 11 years ago

Thank you for feedback!
Here is the next unfinished version:

comment:18 by richlv, 11 years ago

ah, interesting - thanks. now it seems a bit confusing that one has to click on the "clock" icon for time controls to work (as the bar is visible all the time). is it feasible (code, performance etc) wise to filter dynamically, as the slider/input field is adjusted ?

comment:19 by akks, 11 years ago

You are right, showing active panel should mean active filtering (with some delay to lower CPU load). I'll try to implement it.

comment:20 by anonymous, 11 years ago

heya. i saw that the previous approach got in to the latest "tested" - great :)

any plans on the new approach ?

comment:21 by akks, 11 years ago

I'll try to make it usable before next tested release :)

comment:22 by akks, 11 years ago

In 5815/josm:

Improved filtering tracks by date: more convenient (see #8416)
allow sorting track table, ignore broken timestamps for filtering and colorizing
DateEditorWithSlider widget can be reused

comment:23 by akks, 11 years ago

Previous version of filtering was buggy and non-intuitive. Please try this one (without radical GUI changes for now, tested is near).

comment:24 by richlv, 11 years ago

tried 5822, seems to work ok

comment:25 by skyper, 10 years ago

anything left to do ?

comment:26 by Don-vip, 10 years ago

Resolution: fixed
Status: newclosed

I don't think so. Please reopen or create a new one if there are another improvements to do, but it's working fine :)

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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