wradlib.util.find_bbox_indices#

wradlib.util.find_bbox_indices(coords, bbox)[source]#

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.

Parameters:
  • coords (numpy.ndarray) – 3 dimensional array (ny, nx, lon/lat) of floats

  • bbox (numpy.ndarray | list | tuple) – 4-element (llx,lly,urx,ury)

Returns:

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