hydromt.DataArray.raster.xy#
- DataArray.raster.xy(r: ndarray[int], c: ndarray[int], mask: ndarray[bool] = None, mask_outside: bool = False, nodata: float | int = nan) tuple[ndarray[float], ndarray[float]] #
Return x,y coordinates at cell center of row, col indices.
- Parameters:
r (
ndarray
ofint
) – index of rowc (
ndarray
ofint
) – index of columnmask (
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 np.nan
- Returns:
x, y coordinates
- Return type:
Tuple
ofndarray
offloat