geoutils.operators.LocalData#
- class geoutils.operators.LocalData(values, valid, source_ids, coordinates=None, target=None, distances=None, sample_weights=None, support_weights=None, interpolation_weights=None, error_covariance=None)[source]#
This data class stores the nearby source values used to calculate one interpolator/reducer output.
We convert arrays with np.asanyarray() to avoid copies where possible. This object is only used temporarily for each neighbourhood.
- Parameters:
values (
NDArray[floating[Any] |integer[Any]]) – One-dimensional source values.valid (
NDArray[bool]) – Boolean validity of every source value.source_ids (
NDArray[Any]) – ID of every original observation.coordinates (
NDArray[floating[Any] |integer[Any]] |None) – Optional source coordinates with observations along the first dimension.target (
NDArray[floating[Any] |integer[Any]] |None) – Optional target coordinate.distances (
NDArray[floating[Any] |integer[Any]] |None) – Optional source-to-target distances.sample_weights (
NDArray[floating[Any] |integer[Any]] |None) – Optional weights attached to source observations.support_weights (
NDArray[floating[Any] |integer[Any]] |None) – Optional geometric weights, such as covered cell fractions.interpolation_weights (
NDArray[floating[Any] |integer[Any]] |None) – Optional precomputed weights for regular-grid interpolation.error_covariance (
NDArray[floating[Any] |integer[Any]] |None) – Optional covariance of observation errors, with one row and column per value.
- __init__(values, valid, source_ids, coordinates=None, target=None, distances=None, sample_weights=None, support_weights=None, interpolation_weights=None, error_covariance=None)#
Methods
__init__(values, valid, source_ids[, ...])precision_weights(weights)Adjust nonnegative observation weights using their error covariance.
select(selection)Select observations from this LocalData object.
Attributes
coordinatesdistanceserror_covarianceinterpolation_weightssample_weightssupport_weightstargetvaluesvalidsource_ids