odc.geo.roi.roi_intersect

odc.geo.roi.roi_intersect(a, b)[source]

Compute intersection of two ROIs.

Return type:

Union[NormalizedSlice, Tuple[NormalizedSlice, ...]]

Examples

s_[1:30], s_[20:40] => s_[20:30]
s_[1:10], s_[20:40] => s_[10:10]

# works for N dimensions
s_[1:10, 11:21], s_[8:12, 10:30] => s_[8:10, 11:21]