Opened 15 years ago
Last modified 5 years ago
#3495 new enhancement
Automatic way combining
Reported by: | Bürste | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core validator | Version: | latest |
Keywords: | way glomming | Cc: | bilbo, yoshimit@…, joshdoe |
Description
It would be a nice function to have a button to combine all ways which could be combined, cause same roles in every of there relation, same tags and in a straight line. This would make removing a relation which split up many ways to parts very easy.
Attachments (0)
Change History (14)
comment:1 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
comment:2 by , 15 years ago
It actually quite simple:
Find all connected ways that share (one of) their endpoints and combine them if all tags and roles are equal. In other words: combine all ways that have been split for no reason.
However, if a relation is part of many ways: Just select the relation in the relation dialog (the one that appears on the righthand side) and remove it?
comment:4 by , 15 years ago
Cc: | added |
---|
comment:5 by , 15 years ago
xeen, thank you for rewriting my idea.
And you're right it's quite easy to remove a relation from the database, but not to clean up after a relation have deleted and if you think of bus routes and other roles like turn restrictions relations will be used more heavily in future. So this function would be nice.
Before we upload a dataset a question if the user want let JOSM search for ways which might be combined and with a nice select-box that JOSM going to search in future for this automatically.
...
is there a way to remove the needinfo status again?
comment:6 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | needinfo → new |
is there a way to remove the needinfo status again?
You can select "reassign to" and select "team" as target
comment:7 by , 15 years ago
This could become another test in validator:
Possible algorithm
- Collect all way endpoint in some map (keys are nodes, values are lists of ways having node as endnode)
- iterate over map, for each node having:
- exactly two ways with same keys and membership: offer combining (automatically combinable ways)
- more than two: can't be combined automatically, but can be reported (manually combinable ways)
For combinable ways, the program should hop to other ends to see if the way can be combined further and if yes, add them to combining and remove these from further iteration.
As a result, you'll get list of automatically combinable ways (pressing fix would combine them) and manually combinable ways.
comment:8 by , 15 years ago
Maybe is the other way round faster, if we got all ways in a fast compareable form we might also compare them first, and then search the endpoints and remove any which doesn't fit.
Addionally it should use existing IDs and if there are more than one it should use the lowest ID.
comment:9 by , 15 years ago
Component: | Core → Core validator |
---|
comment:10 by , 14 years ago
I would like to suggest that not all tags are equal, but the user could inform which tags must be searched as equals and then, if possible, combine the ways.
I have a bunch of data here with too many segments of ways that must be combined, so I'm searching all ways with a particular tag with the same value and calling the combineWaysWorker(Collection<Way> ways) method to do the job. Some of them can't be combined automatically, but save me a lot of time.
The plugin could do something similar.
Thank you.
comment:11 by , 14 years ago
Cc: | added |
---|
comment:12 by , 13 years ago
Cc: | added |
---|---|
Keywords: | way glomming added |
This is something I've done while preprocessing files. Frederik Ramm made merge-ways.pl for doing this, but I took some C# code from Mike Nice and modified it to avoid combining ways of dual-carriageways (based on the angle) which did a pretty good job. Also, some call this process of combining ways as glomming.
I think this features would be useful in JOSM, and I believe it fits well in with validator.
comment:13 by , 5 years ago
For new ways with id:0
, this might be fine. For ways with positive id at least all parents need to be downloaded first.
comment:14 by , 5 years ago
I think one should also consider boundaries and residential areas before combining ways. It might be intended that a highway=unclassified is split because the road belongs to a different city or maybe has a different implicit maxspeed value.
For me this is a clear wontfix.
I'm not sure whether I understand what you are proposing. Could you submit it again in german (a user called Bürste must be german, right?)