# [OSM-talk] JOSM geometry support

Christoph Eckert ce at christeck.de
Thu Aug 23 22:10:33 BST 2007

```Hi,

> I'm a bit unsure at the moment how one would best implement
> these functions without interfering too much with traditional JOSM
> functions - maybe create an extra layer or so... what geometry
> functions do *you* want and how would you like them?

you shouldn't have asked ;-) . I'm working in the CAD world, so if
things sound fuzzy, don't hesitate to ask me for clarification:

* Assumed segments would disappear, the segment tool would disappear as
well. Then we'd probably (and hopefully :) have a node and a "way"
creation tool

* As a way without tags IMO isn't a way at all, I'd just call it a
polygon or polyline

* CAD applications usually provide a set of (configurable) snapping
modes. One of them usually is a grid (and I doubt it is of any interest
for our purposes). But further snapping modes exist so you can snap
directly to objects (nodes, polyline edges, center of objects, virtual
crossings of objects etc.). A third one I can imagine are modifier keys
which allow to align a polyline segment in fixed angles to the
previously drawn segment or to adjacent objects (e.g. 30°, 45°, 90°
etc.). This would not allow yet to draw a house front in parallel to a
street, but at least you can draw perpendicular lines

* That's not enough yet to create a perfect rectangle: It will be
difficult to draw the third segment/fourth node of the rectangle. Thus
imagine the snapping mode: It would allow to place the fourth node at
the virtual crossing of a perdendicular to the first and the second
segment through nodes one and three. After placing the forth
node, the polyline can get completed to a perfect rectangle simply by
clicking on the very first node created

* BTW: If such a polygon/polyline tool made sense, it would be cool if a
click on an existing segment would automatically "insert node into
segment" to form a junction with one and the same tool (somehow a
combination/shortcut of the existing "insert node into segment",
"create segment" and "create way" tools). Even better, snapping could
also enable that the last drawn segment/the autoinserted node gets
inserted right at the point where the adjacent segment was
perpendicular to the segment which is about to be split

* Combined with the snapping modes, a rotation tool could be useful.
Select a set of nodes/polygons, click at the rotation's center point,
click at a second relation point and then the third point to define the
angle

* Similar to the existing aligning tools (circle and line) I can imagine
a "perpendicular" aligning tool which adjusts three selected nodes

* The move tool could learn to move polylines as a whole. When clicking
on an edge of a polyline with the move tool, it could try to move the
entire object (including it's nodes) except of nodes that form
junctions with other objects. This would it make easier to move areas
around, especially buildings come to my mind. Though we'd still don't
have many of them, we will see more and more as soon as we have all
streets mapped (which surely will happen soon :)

* A further tool I sometimes miss is a tool that can connect two
crossing ways by inserting a node into one way, splitting the other and
connecting it to this node as well. If you imagine one street already
exists and you want to create a second one that crosses the first one,
it would help a lot

All that said, I should finally shut up as I cannot write such code by
myself. Thus my pain receptors are prepared to read the "give the code"