[josm-dev] When to move a node?

Hermann Schwärzler hermann.schwaerzler at chello.at
Tue Nov 18 20:54:25 GMT 2008


hello harald

Harald Kucharek schrieb:
> When Frederik added my orthogonalization action to JOSM, he remarked:
> --
> There's one thing I do not like yet, and that is that multiple changes 
> are generated if you call the function repeatedly (it doesn't recognize 
> that the shape is already rectangular, makes minuscle adjustments). I 
> tried to build in a treshold under which there would be no change 
> recorded but it didn't work out well.
> --
[...]
> That was my idea. Now, any other ideas or thoughts about the problem?

as Frederik had pointed out this problem to me when I first asked him 
about changes to the Orthogonalize function I considered it while 
writing my patch (see the TODO: comment).

with my patch a "angle_diff_max" is calculated. that is the maximum 
difference in the normalized heading of the adjacent sides of a way.

we could use this to find out if a way has already all sides orthogonal: 
when angle_diff_max is below a certain threshold there is no need to do 
anything.

I think I will soon (within the next two days) find time to do some 
statistics in order to find out what could be a good value for the 
threshold. I will post my findings here.

regards
hermann




More information about the josm-dev mailing list