[josm-dev] Geometry support

Stefan Baebler stefan.baebler at gmail.com
Wed Apr 9 07:49:04 BST 2008


Hi!

I was just drawing some buildings in my city yesterday and came to a 
conclusion that there should be better support for rectangles. What i 
had in mind after finishing yesterday was an "Arrange nodes in 
rectangle" function which would work similar to existing circular 
alignment. It should figure out how to minimally adjust the nodes to 
make the shape rectangular. This would be also good for fixing existing 
buildings and other rectangular features. Possibly it could also adjust 
non-rectangular shapes (complex buildings with 90 degree corners) with 
almost parallel sides into shapes with parallel sides with perfect 90 
degree corners.

Will try new JOSM features in the coming days and get back with my 
feedback.

Stefan

Frederik Ramm wrote:
> Hi,
>
>    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:
> http://www.remote.org/frederik/tmp/josm-with-extrude.jar
>
> 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.
>
> 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
> rectangle:
>
> o------o----o------o
>
> 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
> they are. 
>
> 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...?
>
> Any feedback is welcome.
>
> Bye
> Frederik
>
>   





More information about the josm-dev mailing list