[Gdal-dev] remove colinear points from polygon
Mateusz Loskot
mateusz at loskot.net
Tue Mar 6 03:14:06 EST 2007
Martel, Christian wrote:
> Hi,
>
> 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.
Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
More information about the Gdal-dev
mailing list