New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New filters based on counting functions #197
Comments
|
interesting problems :
and filtering + exporting the number to csv |
|
This would be a great feature. CSV output is no problem now, that's related to the "out" settings, and already allows printing counts. First implementation For the syntax, why not follow JOSM syntax for this? The JOSM search tool has been offering this for a while, so should give some reference on what searches to include or exclude. To answer some questions:
There seems to be one thing missing from JOSM, which is counting relations. As relations can be counted in the parent or the child direction (something that doesn't happen with nodes and ways), this needs 2 queries
JOSM seems to ignore closing waypoints (so if the last waypoint is the same as the first, it doesn't get counted), but JOSM does not ignore other waypoints that overlap (f.e. when the way has self-intersections). To filter out closed ways, JOSM has the special Future expansions The above would be great for a first implementation of counting, but we should also leave room in the syntax for expansion:
way["highway"]->.highways;
node(ways.highways:2-);
relation(ways:50-,role:"outer") |
Or catching tagging mistake of |
|
For
For |
|
The parent count will not be implemented as a direct function. Use a foreach loop with upward recurse instead. Everything else is implemented. |
|
Closed ways are in #419 |
This issue collects a few enhancement requests for statistics-based filters from various forum posts, e.g. [1].
nodes/ways/relations/areas: filter on the number of tagsways: filter on the number of (possibly distinct) nodesnodes: filter on the number of parent ways/relationsrelations: filter on the number of membersrelations: filter members with a specific roleretations: filter members with a specific object typerelations: filter on the total number ofrelation,wayandnode(and sum of those three object types) members.For each "number", an exact value as well as a range (min.. max value) would be desirable.
Examples (not an actual syntax proposal):
Update April 12th 2015:
@GeorgV suggested the following generalizations to keep the number of keywords low:
(1) Change
parentwaycounttoparentcount- this would also allow to check in how many relations a way occurs. On the other hand, node(parentcount:2) might refer to a way or maybe even a relation, depending on the definition of a parent. I think this needs to be discussed in more detail.(2) Change
nodecounttomembercount- interpreting nodes of a way as members seems reasonable, unless we want to differentiate between rel(nodecount) and way(nodecount).Also, Georg mentioned that we need to specify, if respective counts refer to distinct numbers or not. In the case of a closed way, we would e.g. determine a nodecount of 4, but a distinctnodecount of 3.
@ all: if you have more ideas, please add them below. I will try to consolidate them later on.
This issue supersedes #180.
The text was updated successfully, but these errors were encountered: