odc.geo.roi.polygon_path
- odc.geo.roi.polygon_path(x, y=None)[source]
Points along axis aligned polygon.
A little bit like
numpy.meshgrid()
, except returns only boundary points and limited to a 2d case only.Examples
[0,1] - unit square [0,1], [0,1] => [[0, 1, 1, 0, 0], [0, 0, 1, 1, 0]]) # three points per X, two point per Y side [0,1,2], [7,9] => [[0, 1, 2, 2, 1, 0, 0], [7, 7, 7, 9, 9, 9, 7]]