[josm-dev] Find superfluous nodes

Jo winfixit at gmail.com
Thu May 30 06:57:24 UTC 2013

2013/5/30 Dirk Stöcker <openstreetmap at dstoecker.de>

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

I'd like to call it from a Python/Jython script through the scripting
plugin. Can I call it as a function specifying this parameter?


More information about the josm-dev mailing list