[Gdal-dev] remove colinear points from polygon
mateusz at loskot.net
Tue Mar 6 03:14:06 EST 2007
Martel, Christian wrote:
> After merging several polygons with union, I get a big polygon with
> many colinear points. Example : with line (0 0,1 0,2 0), 1 0 is
> colinear with the others. How can I remove these middle colinear
> points on the polygon border ?
The most universal method is to use use Douglas-Peucker algorithm for
polyline simplification (implemented in GEOS).
Another possible solution is to calculate and compare slopes
between adjacent points.
There is also an option based on distance formula and ordering points of
line, but this one is usually slower than these two above.
More information about the Gdal-dev