wradlib.util.find_bbox_indices

wradlib.util.find_bbox_indices(coords, bbox)

Find min/max-indices for NxMx2 array coords using bbox-values.

The bounding box is defined by two points (llx,lly and urx,ury) It finds the first indices before llx,lly and the first indices after urx,ury. If no index is found 0 and N/M is returned.

New in version 0.6.0.

Changed in version 0.10.0: Find indices no matter if the coordinate origin is lower or upper.

Parameters:
  • coords (numpy.ndarray) – 3 dimensional array (ny, nx, lon/lat) of floats
  • bbox (4-element numpy.ndarray, list or tuple of floats) – (llx,lly,urx,ury)
Returns:

bbind (tuple) – 4-element tuple of int (llx,lly,urx,ury)