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