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 (
ndarrayoffloat) – x coordinatesys (
ndarrayoffloat) – y coordinatesmask (
ndarrayofbool, 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:
ndarrayofint