xrspatial.edge_detection.prewitt_y#
- xrspatial.edge_detection.prewitt_y(agg, name='prewitt_y', boundary='nan')[source]#
Compute the vertical gradient of a raster using the Prewitt operator.
Detects horizontal edges by convolving with the Prewitt-Y kernel:
[[-1, -1, -1], [ 0, 0, 0], [ 1, 1, 1]]
- Parameters:
agg (xarray.DataArray) – 2D raster. Supports NumPy, CuPy, Dask+NumPy, and Dask+CuPy backends.
name (str, default='prewitt_y') – Name for the output DataArray.
boundary (str, default='nan') – How to handle edges: ‘nan’, ‘nearest’, ‘reflect’, or ‘wrap’.
- Returns:
Vertical gradient with the same shape and backend as the input.
- Return type:
xarray.DataArray