This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Filter polygon nodes but ignore those that form angles ~90 degs

1

Hi I've a boundary polygon I wish to import into OSM (Don't worry, it has the required licence). However there are far too many nodes. I have software to filter them out by distance or frequency, but that removes certain intricate sections (in this case, as it passes between a number of houses.)

Is there any software or algorithm which can ignore nodes which form angles around 90 degrees? I've the data in a number of formats (CSV, XML, GeoJSON etc)

asked 18 Feb '19, 19:11

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

not really answering your question re. the 90°, but I guess the Ramer–Douglas–Peucker algorithm which is (as far as I know) used by e.g. GPSies (import/upload gpx, simplify, download - does not need a login) should work fine.

(18 Feb '19, 19:50) aseerel4c26 ♦

Source code available on GitHub .