Opened 4 years ago

Last modified 4 years ago

#21572 new enhancement

[RFC][Patch] Allow matching by object history in search function — at Version 1

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

Description (last modified by Woazboat)

https://github.com/JOSM/josm/pull/80
https://patch-diff.githubusercontent.com/raw/JOSM/josm/pull/80.patch

Added the was keyword to the search function to allow matching objects based on their previous states. I.e. was <expr> matches an object if <expr> matches any previous version of the object.

(For now) the history search only works for objects whose history is already in the cache/history data set and does not fetch history data automatically. (Not sure how feasible downloading the history of a massive amount of objects is in general with the OSM API)
A menu action to download and cache the version history for selected objects was added as well.
The history browser dialog currently clears the history cache/stored history data when it's closed, which isn't great when it's also used elsewhere. This will probably need to be changed https://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java#L124

Example:

  • was building=* to search for all objects that either currently have a building=* tag or have had this tag at any point in their history.
  • was building=* -building=* to search for all objects that previously had a building=* tag which was removed at some point.

Change History (1)

comment:1 by Woazboat, 4 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.