clipSH3(points,
corners,
inull=False,
closed=False)
|
|
Clip a polygon against a clip region or box using the Sutherland_Hodgman algorithm.
- Parameters:
points - The polygon points (LatLon []).
corners - Three or more points defining a convex clip region
(LatLon []) or two points to specify a rectangular
clip box.
inull - Optionally, include null edges (bool ).
closed - Close the clipped points (bool ).
- Returns:
- Yield a 3-tuple (start, end, original) for each edge of the
clipped polygon. The start and end points
LatLon of
the portion of the edge inside or on the clip region. The
original bool indicates whether the edge is part of
the original polygon or part of the clip region.
- Raises:
ValueError - Insufficient number of points or the corners specify
a polar, zero-area, non-convex or otherwise invalid clip region.
|