casagui.utils._regions
Module Contents
Functions
|
Returns indexes for a 2D array of the given |
- casagui.utils._regions.polygon_indexes(xs, ys, shape)
Returns indexes for a 2D array of the given
shape
which lie within the polygon specified byxs
andys
.- Parameters:
xs (list of numbers) – the X coordinates for the vertices of the polygon
ys (list of numbers) – the Y coordinates for the vertices of the polygon
shape (( int, int )) – the shape of the plane in which the polygon is found
- Returns:
the stream of tuples that is returned will be the indexes of the elements which lie within the polygon
- Return type:
generator of tuples