JOSM: The outline adjustment 'refinement' trick with Alt+X

Probably many of the JOSM users know this already but since I’ve been using this mapping app for about 20 months and only now discovered this by accident doing a wrong key-combo hit, it is I think worth sharing. It starts with a polygon or multipolygon, hereafter MP, with single outline or inner ring consisting of a simple polygon, like this one which I think of as appearing to be done in rule mapping mode.

To refine the outline, draw a single line starting and ending at the target polygon outline. You may go inside and outside the polygon outline, so was the discovery preferring to only let the new object outline to only connect with the polygon at beginning and end as there are occasional unexpected outcomes such as duplicate segments e.g. no 2 sequential nodes best not be following the old MP outline.

Upon having drawn the new line and the MP/polygon being lone, not side sharing, hit Alt+X and a closed polygon is completed including the section of the target single outline MP/polygon. Upon this action, the following state comes about, with o-dear seeming self intersections,

No worry though, select the old outline within the target area, and in the relation manager or in the selected tags pane delete the element from the MP relation.

image

The result shows as a selected red highlighted polygon, still with the self intersections if that so happened during drawing.

Now delete that red line without the MP relation and the result is…

Simple, and even easier when ‘refining’ an outline on a simple polygon, no MP relation deleting, just select a part of the old outline and delete.

Easy peasy.

Enjoy

NB, Where Alt+X does not work, it works for cutting-out and cutting-in simultaneous (the second biggest surprise), there’s Shift+J to merge 2 side sharing polygons, either with both identical tags or the additional area without tags, can even have different tags and the merge window offering to select which common tags to keep. Whole or part courtesy of I think the Utilsplugin2 JOSM add-on, at least missed seeing these on the JOSM shortcuts page.

4 Likes

there is also “w” to refine ways, it lets you add, move and delete nodes from ways with a click (alt and ctrl to add/delete). Once you get used to it it is very fast and you don’t have to care about relation membership as long as you don’t change the topology (delete end nodes)

1 Like

Use W rarely also because it is very finicky about moving ways that are made up of 2 side sharing polygons not to speak of getting your mouse too close to another side of the polygon edge. For simple road lay refinements it’s the go-to for sure.

1 Like