Data specifying a polygon or polygons. See Details.
...
Ignored.
eps
Spatial resolution for coordinates.
x0,y0
Spatial origin for coordinates.
filltype
Polygon-filling rule. See Details.
Details
This is an interface to the function SimplifyPolygons in
Angus Johnson's C++ library Clipper.
It tries to remove self-intersections from the supplied polygon,
by performing a boolean union operation using the nominated
filltype. The result may be one or several polygons.
The argument A should be either
a list containing two components x and y
giving the coordinates of the vertices of a single polygon.
The last vertex should
not repeat the first vertex.
a list of list(x,y) structures giving
the coordinates of the vertices of several polygons.
The argument filltype determines the polygon fill type.
Even-Odd:
The default rule is even-odd filling,
in which every polygon edge demarcates a boundary between
the inside and outside of the region.
It does not matter whether a polygon is traversed in
clockwise or anticlockwise order. Holes are determined
simply by their locations relative to other polygons such that
outers contain holes and holes contain outers.
Non-Zero:
Under the nonzero filling rule, an outer boundary must be
traversed in clockwise order, while a hole must be traversed
in anticlockwise order.
Positive:
Under the positive filling rule, the filled region
consists of all points with positive winding number.
Negative:
Under the negative filling rule, the filled region
consists of all points with negative winding number.
Calculations are performed in integer arithmetic
after subtracting x0,y0 from the coordinates,
dividing by eps, and rounding to the nearest integer.
Thus, eps is the effective spatial resolution.
The default values ensure reasonable accuracy.
Value
Data specifying polygons, in the same format as A.