[josm-dev] Find superfluous nodes

Dirk Stöcker openstreetmap at dstoecker.de
Thu May 30 06:51:22 UTC 2013


On Thu, 30 May 2013, Jo wrote:

> We got some data where there are extra nodes, which I'd like to get rid of
> before integrating it into OSM.
>
> The simplify function is too coarse for the purpose and doing it manually
> gets tedious.
>
> Is there a way to determine that 3 nodes are on a straight line, or is it
> possible to calculate the bearing (directional coefficient?) of the line
> intersecting 2 points? If this is the same for two consecutive lines, the
> node in between can be safely removed. (I'll check that it's not part of an
> adjacent building first, of course).

Simplify function has an side displacement variable (an expert option) 
specifying the maximum displacement a track should get when removing 
nodes. Reduce the value and the function should do what you want.

Ciao
-- 
http://www.dstoecker.eu/ (PGP key available)




More information about the josm-dev mailing list