[josm-dev] Geometry support
frederik at remote.org
Wed Apr 9 00:43:00 BST 2008
we have talked a lot about putting some sort of CAD-like "drawing
functions" into JOSM. The most important use case for these is
creating true rectangular shapes.
There are many ideas how this could be done, and most have some merit.
I have implemented one of these to play around with and get an idea
how it could work. This method works a bit like Google's "sketchup"
tool which is relatively user friendly.
Download the experimental JOSM version from here:
Now, to draw a rectangle, do this:
* first draw a simple two-node way along one of the edges of the
* select the "geometry" tool on the left hand side (the one with the
triangular ruler as an icon)
* using the mouse, grab the centre of the line you have drawn and
pull it in either direction. A rectangle is drawn.
* release the mouse. Two new nodes are inserted, and your two-node
way is changed into an area.
The best thing about this is that you can continue to work with the
rectangle, i.e. if you now insert two nodes at one side of the
and grab the middle bit and pull it up or down, again two new nodes
will be inserted into your shape.
I'm sure this will still have a lot of quirks, please tell me what
For this demo, I have created an extra mode, which is a bit sad since
we were just about to get rid of tons of mode changes. Do you think
there is good way how we could integrate this functionality into the
standard drawing mode? Currently, when in standard drawing mode,
dragging a way does nothing, so we could theoretically put this
functionality in there. This would be good since drawing a complex
building might require inserting lots of nodes and extruding lines
alternatingly. On the other hand, maybe we will introduce more drawing
functions like this extrusion and it is good to group them in an extra
Any feedback is welcome.
Frederik Ramm ## eMail frederik at remote.org ## N49°00'09" E008°23'33"
More information about the josm-dev