[josm-dev] [PATCH] - OrthogonalizeAction

Hermann Schwaerzler hermann.schwaerzler at chello.at
Fri Nov 21 10:01:40 GMT 2008


hello gert

Gert Gremmen wrote:
> http://tile.openstreetmap.nl/?zoom=18&lat=51.99522&lon=4.34562&layers=B0
> 00000F
> 
> I suppose you can put that URL into JOSM and download
> the area.
> I tried using JOM version 1087 and the most recent
> plug-ins (though that should not be a problem)
> Actually it does not delete it, but becomes invisible.


you mean the buildings that look like a three-pointed star?
well, you can't orthogonalize those as the function tries to
orthogonalize _all_ edges. that does not work with such a shape as only
shapes with an even number of edges can be truely orthogonalized!


I think we need another check before orthogonalizing. how about that:

// Check if way has an even number of edges
if (((way.nodes.size() - 1) % 2) == 1) {
    JOptionPane.showMessageDialog(Main.parent, tr("Please select a way
with an even number of edges."));
    return;
}

I don't like the wording of the dialog-message. Can someone suggest a
better one?

regards
hermann




More information about the josm-dev mailing list