[josm-dev] Find superfluous nodes
Paul Norman
penorman at mac.com
Thu May 30 06:59:28 UTC 2013
> From: Jo [mailto:winfixit at gmail.com]
> Sent: Wednesday, May 29, 2013 10:42 PM
> To: josm-dev
> Subject: [josm-dev] Find superfluous nodes
>
> Hi,
>
> We got some data where there are extra nodes, which I'd like to get rid
> of before integrating it into OSM.
Standard import cautions apply here of course,
https://wiki.openstreetmap.org/wiki/Import/Guidelines, etc
> The simplify function is too coarse for the purpose and doing it
> manually gets tedious.
Even with adjusting simplify-way.max-error?
> 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).
This should be equivalent to simplify with a max-error close to 0.
It's worth noting that simplifying before converting to .osm format can
speed up the conversion process if you're dealing with a lot of data and
that when two ways share nodes for part of their length JOSM may not
simplify that length.
More information about the josm-dev
mailing list