[josm-dev] Geometry support

Chris Morley c.morley at dsl.pipex.com
Fri Apr 11 21:37:24 BST 2008

Frederik Ramm wrote:
> Now, to draw a rectangle, do this:
> * first draw a simple two-node way along one of the edges of the
>   building.
> * 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.

Can I suggest that nothing is drawn if the new nodes are in (almost) the 
same place as the old ones. And further, that dragging the segment 
between the new nodes back to (almost) on top of the original two 
deletes the two new nodes. This would serve two purposes.

a) It provides a natural undo - open the rectangle by dragging, close it 
by dragging back. This is especially useful in a modeless interface 
where the feature could be used inadvertantly and an easy undo is really 
needed. Unlike Cntl Z or toolbar buttons there is no mental gear change 
- you use the same method to undo as to do.

b) It helps prevent rubbish data (superimposed nodes and ways) being 

Like Stefan Baebler, I found the tool to be not much use for tracing the 
buildings in the car factory from a Yahoo image. The shapes were too 
complex and hand drawing was easier.

Incidentally, I don't like the line dangling from the cursor. Is is a 
bug or a new feature I should have turned off? It's not a good interface 
feature because I panic when it isn't obvious how to make it go away. It 
even hangs around for some time after Deselect All.

> 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
> mode...?

The commonest use of this feature would be to assist the creation of 
simple buildings, but there would be much less advantage if there was a 
mode change needed. Doing common tasks easily is more important than a 
pedantically rigorous organization. Will these further geometric tools 
find a lot of use anyway??


More information about the josm-dev mailing list