Opened 16 years ago
Closed 16 years ago
#1652 closed enhancement (fixed)
[PATCH] JOSM should have a feature to join two areas
Reported by: | xeen | Owned by: | xeen |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | unspecified | Version: | latest |
Keywords: | Cc: |
Description
Currently you have to:
1) Add new nodes where both areas cross/start to overlap
2) Delete all nodes that reach into either of the areas "inner" (i.e. the ones between the two new nodes created in step one)
3) Disconnect the shared part of the way for both areas and delete it
4) Join the ways
An automated feature could save quite some time, although I'm not sure how easy it is to determine the nodes in step 1 and 2.
Attachments (4)
Change History (9)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Owner: | changed from | to
---|
I'm working on this and it basically works, just need to add tag/relations/non-downloaded stuff checking. Well, and a /lot/ of testing.
by , 16 years ago
Attachment: | joinareas.png added |
---|
by , 16 years ago
Attachment: | JoinAreasFunction.patch added |
---|
Includes TestFile.osm, JoinAreas.java and changes to UtilsPlugin.java
comment:3 by , 16 years ago
Summary: | JOSM should have a feature to join two areas → [PATCH] JOSM should have a feature to join two areas |
---|
The patch depends on ExtendedDialog.java (can't find the revision where it was committed, but a rather recent one).
It modifies the utils plugin to add the functionality. I checked it against all cases that I could come up with (they are included in the test file) and it works for them, maybe there are more. It will produce relations with errors though if the selection makes no sense, which is most often the case when I wouldn't know how to join the areas if I had to do it manually.
It warns the users of being experimental, but hopefully no new bugs turn up :). It currently uses some hacks that allow it to take advantage of already-written code in CombineWayAction or SplitWaysAction. This could be changed in a later version to allow "nicer" access, if anyone cares. Currently my focus is on making it work for most cases, the how can still be refined later.
by , 16 years ago
Attachment: | JoinAreasFunction with support for adjacent areas.patch added |
---|
Fixing is hard
comment:4 by , 16 years ago
I added a few fixes/checks so that adjacent areas (i.e. areas that share nodes) can be joined properly as well. I updated the testfile.
comment:5 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Applied in 13723.
I like it. Even multipolygon support. Nice.
May be we should combine all three "join" functions (join nodes, ways, areas) in one tool/action? Which function is executed depends then on the objects selected.