ds.rst.resample_at_points() or Raster.resample_at_points()#
- RasterBase.resample_at_points(points, method=None, *, resampling=None, backend='auto', resampling_kwargs=None, coverage=None, band=1, input_latlon=False, as_array=False, nodata_handling=None, error_structure=None, window=None, window_shape=None, masked=False, boundless=True, **kwargs)[source]#
Resample raster values at points with a named interpolation or statistic.
Interpolation shares the SciPy and chunked paths of interp_at_points(). Statistics summarize a 3 x 3 window by default; pass window=5 to use five cells along each axis. Advanced callers can supply an Interpolator or Reducer for custom calculations or neighborhoods.
- Parameters:
points (
tuple[NDArray[floating[Any] |integer[Any]],NDArray[floating[Any] |integer[Any]]] |tuple[int|float|integer[Any] |floating[Any],int|float|integer[Any] |floating[Any]] |PointCloudBase|GeoDataFrame|DataArray) – X/Y coordinates or a point cloud defining the requested positions.method (
Literal['nearest','linear','bilinear','cubic','cubic_convolution','cubic_spline','lanczos','quintic','slinear','pchip','splinef2d','idw','inv_dist','kriging','mean','average','sum','median','med','quantile','q1','q3','mode','minimum','min','maximum','max','range','count','stdev','std','standard_deviation','rms','rmse','average_distance','average_distance_pts'] |Interpolator|Reducer|Callable[[NDArray[floating[Any] |integer[Any]]],float] |None) – Legacy alias for resampling, also accepting a reduction callable.resampling (
Literal['nearest','linear','bilinear','cubic','cubic_convolution','cubic_spline','lanczos','quintic','slinear','pchip','splinef2d','idw','inv_dist','kriging','mean','average','sum','median','med','quantile','q1','q3','mode','minimum','min','maximum','max','range','count','stdev','std','standard_deviation','rms','rmse','average_distance','average_distance_pts'] |Interpolator|Reducer|None) – Built-in method name, such as “linear”, “mean” or “median”, or an advanced operator. Defaults to the configured interpolation method.backend (
Literal['auto','gdal','scipy','numba','gstools','gpytorch']) – “auto” uses SciPy; “gstools” and “gpytorch” select a kriging solver.resampling_kwargs (
dict[str,Any] |None) – Method settings, such as a quantile q or a fitted kriging model.coverage (
Literal['center','all_touched','fractional'] |None) – Select cells by center, include all touched cells, or weight by covered area.band (
int) – Source band number, starting at one.input_latlon (
bool) – Convert tuple coordinates from longitude/latitude to the raster CRS.as_array (
bool) – Return values rather than a point cloud at the requested coordinates.nodata_handling (
Literal['nearest','ignore','propagate'] |Literal['half_order_up','half_order_down'] |int|None) – How missing source values affect the result. Reducers omit them by default. A distance choice also masks results near missing source cells.error_structure (
ErrorStructure|None) – Optional observation error model used for weighting and fitting. Use geoutils.uncertainty.propagate() to calculate output uncertainty.window (
int|None) – Optional odd window size for a reducer, overriding its configured neighborhood for this call.window_shape (
Literal['square','circular'] |None) – Use a square or circular window.masked (
bool) – Return a masked array when as_array=True.boundless (
bool) – Allow partial reduction windows at raster edges. If False, incomplete windows return NaN.kwargs (
Any) – Additional interp_at_points() options when method is an Interpolator or method name.
- Return type:
- Returns:
Resampled values.