Inverse distance weighted spatial interpolation of plane or line objects.
Arguments
- x
numeric vector, array, or object of class
"line"
or"plane"
- coords
a
"sf"
object containing the geographic coordinates ofx
measurements- grid
(optional) Point object of class
"sf"
.`- lon_range, lat_range
two column vector. coordinate range. ignored when grid is specified.
- gridsize
Numeric. Target spacing of the regular grid in decimal degree. Default is
2.5
. (is ignored if grid is specified)- min_data
Integer. Minimum number of data per kernel. Default is
3
- threshold
Numeric. Threshold for deviation of direction. Default is
25
- arte_thres
Numeric. Maximum distance (in km) of the grid point to the next data point. Default is
200
- dist_weight
Distance weighting method which should be used:
"linear"
, or"inverse"
(the default).- idp
Numeric. The weighting power of inverse distance. When set to
0
, no weighting is applied.- dist_threshold
Numeric. Distance weight to prevent overweight of data nearby (0 to 1). Default is
0.1
- R_range
Numeric value or vector specifying the kernel half-width, i.e. the search radius (in km). Default is
1
- compact
logical.
Details
Based on tectonicr::stress2grid()
Examples
if (FALSE) { # \dontrun{
data <- read_strabo_JSON("E:/Lakehead/Field work/StraboSpot_07_02_2023.json", dataset = "TS")
ps <- data$data |>
dplyr::mutate(dipdir = (strike + 90) %% 360) |>
dplyr::filter(type == "planar_orientation" &
!(feature_type %in% c("other", "vector", "option_13")))
ps_vec <- structr::as.plane(cbind(ps$dipdir, ps$dip))
spatial_interpolation(
x = ps_vec, coords = ps, gridsize = .05, R_range = seq(1, 10, 1),
dist_threshold = 0.01, threshold = Inf
)
} # }