hydromt.DataArray.raster.rowcol#
- DataArray.raster.rowcol(xs, ys, mask=None, mask_outside=False, nodata=-1) tuple[ndarray[int], ndarray[int]] #
Return row, col indices of x, y coordinates.
- Parameters:
xs (
ndarray
offloat
) – x coordinatesys (
ndarray
offloat
) – y coordinatesmask (
ndarray
ofbool
, optional) – data mask of valid values, by default Nonemask_outside (
boolean
, optional) – mask xy points outside domain (i.e. set nodata), by default Falsenodata (
int
, optional) – nodata value, used for output array, by default -1
- Returns:
linear indices
- Return type:
ndarray
ofint