How do I continue a straight line from an angle to a different line?

I’m a new editor. I’m trying to continue a line from the vertex of the angle it’s conjoined with to a different line, but I cannot find a reliable way of doing this. The tutorials and guides I read did not answer my question in detail. How do I do this in iD and JOSM? I attached an image for illustration. The red is the line I’m trying to create. The green is to show the red line and horizontal black line are supplementary.

AFAIK there is no built-in way to do in iD (see [Feature Request] Extend Line · Issue #8672 · openstreetmap/iD · GitHub )

When needed I would just draw it by hand, eyeballing it.

What about JOSM?

I do not remember such feature there, but I am less sure whether it exists or not.

IMHO, the data model of OSM does not allow this.
You can’t fork a way. A fork with two ends.

In this case, the red line has to be a new, separate one.
You can copy&paste the values from the existing to the new one.

I (mis)understood them as interested in creating way that would continue angle of already existing line, and being fine with splitting existing line if needed.

Here’s how I would do that in JOSM:

  • draw the red line as crossing over the right black line, but without an intersecting node
  • select the red line, the green node, and the next node to the left, and press Q — this will make the red line parallel to the selected nodes of the black line, without moving their common node (by moving the “free-floating” node of the red line)
  • now select the red line and the right black line, and press Shift+I — this will create the intersection node
  • delete the now unnecessary node to the right of the intersection node

You can just use the angle snapping mode of the draw tool. (Press ‘a’ to toggle angle snapping when you’re in draw mode.)
Remove the first helper node from the way after you’ve drawn the extension by selecting both the node and the way, then pressing alt+j (disconnect node from way).

Screencast_20260411_123917


Edit: TIL you can just right click on a way segment, or mouse over with ctrl held to use it as the reference. No need to have a helper way segment already in place.

Screencast_20260411_140207

8 Likes

JOSM lets you use the Angle Snapping tool to draw lines at 0º, 30º, 45º, 60º, and 90º

https://josm.openstreetmap.de/wiki/Help/Action/Draw/AngleSnap

This helps. Thanks!