distance_from_pb: Distance from plate boundary

View source: R/pb_distance.R

distance_from_pbR Documentation

Distance from plate boundary

Description

Absolute distance of data points from the nearest plate boundary in degree

Usage

distance_from_pb(x, PoR, pb, tangential = FALSE, km = FALSE, ...)

Arguments

x, pb

sf objects of the data points and the plate boundary geometries in the geographical coordinate system

PoR

Pole of Rotation. "data.frame" or object of class "euler.pole" containing the geographical coordinates of the Pole of Rotation

tangential

Logical. Whether the plate boundary is a tangential boundary (TRUE) or an inward and outward boundary (FALSE, the default).

km

Logical. Whether the distance is expressed in kilometers (TRUE) or in degrees (FALSE, the default).

...

optional arguments passed to smoothr::densify()

Details

The distance to the plate boundary is the longitudinal or latitudinal difference between the data point and the plate boundary (along the closest latitude or longitude) for inward/outward or tangential plate boundaries, respectively.

Value

Numeric vector of the great circle distances

References

Wdowinski, S. (1998). A theory of intraplate tectonics. Journal of Geophysical Research: Solid Earth, 103(3), 5037<U+2013>5059. http://dx.doi.org/10.1029/97JB03390

Examples

data("nuvel1")
na_pa <- subset(nuvel1, nuvel1$plate.rot == "na")

data("plates")
plate_boundary <- subset(plates, plates$pair == "na-pa")

data("san_andreas")
res <- distance_from_pb(
  x = san_andreas, PoR = na_pa, pb = plate_boundary, tangential = TRUE
)
head(res)

res.km <- distance_from_pb(
  x = san_andreas, PoR = na_pa, pb = plate_boundary, tangential = TRUE, km = TRUE
)
range(res.km)

tectonicr documentation built on Sept. 11, 2024, 6:05 p.m.