% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/export_geotiff.R
\name{.idw_interpolate}
\alias{.idw_interpolate}
\title{Internal IDW interpolation (no external dependencies)}
\usage{
.idw_interpolate(pts_lon, pts_lat, values, rast, power = 2, max_dist = 0.02)
}
\arguments{
\item{pts_lon, pts_lat}{Numeric vectors of point coordinates.}

\item{values}{Numeric vector of values to interpolate (same length as pts_*).}

\item{rast}{A \code{SpatRaster} template defining the output grid.}

\item{power}{Numeric. Distance decay exponent.}

\item{max_dist}{Numeric. Search radius in same units as coordinates.}
}
\value{
Numeric vector of interpolated values, one per raster cell.
}
\description{
Vectorised Inverse Distance Weighting using base-R matrix operations.
Computes a weighted mean of point values for every cell centre in a raster
template, using only points within \code{max_dist} degrees of each cell.
}
\keyword{internal}
