Skip to contents

Transform spatial objects from PoR to geographical coordinate reference system and vice versa.

Usage

PoR_to_geographical_sf(x, PoR)

geographical_to_PoR_sf(x, PoR)

Arguments

x

sf, SpatRast, or Raster* object of the data points in geographical or PoR coordinate system

PoR

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

Value

sf or SpatRast object of the data points in the transformed geographical or PoR coordinate system

Details

The PoR coordinate reference system is oblique transformation of the geographical coordinate system with the Euler pole coordinates being the translation factors.

Examples

data("nuvel1")
PoR <- subset(nuvel1, nuvel1$plate.rot == "na") # North America relative to Pacific plate
data("san_andreas")
san_andreas.por <- geographical_to_PoR_sf(san_andreas, PoR)
PoR_to_geographical_sf(san_andreas.por, PoR)
#> Simple feature collection with 1126 features and 9 fields
#> Geometry type: POINT
#> Dimension:     XY
#> Bounding box:  xmin: -125.82 ymin: 23.08 xmax: -108 ymax: 39.94
#> Geodetic CRS:  WGS 84
#> First 10 features:
#>          id   lat     lon azi unc type depth quality regime
#> 1  wsm00892 38.14 -118.84  50  25  FMS     7       C      S
#> 2  wsm00893 35.97 -114.71  54  25  FMS     5       C      S
#> 3  wsm00894 37.93 -118.17  24  25  FMS     5       C      S
#> 4  wsm00896 38.63 -118.21  41  25  FMS    17       C      N
#> 5  wsm00897 39.08 -115.62  30  25  FMS     5       C      N
#> 6  wsm00903 38.58 -112.58  27  25  FMS     7       C      N
#> 7  wsm00904 38.71 -112.04  29  25  FMS     9       C      N
#> 8  wsm00905 37.30 -114.94  58  25  FMS     5       C     NS
#> 9  wsm00906 37.61 -113.30  32  25  FMS     2       C     TS
#> 10 wsm00916 37.69 -115.05  47  25  FMS     3       C      S
#>                 geometry
#> 1  POINT (-118.84 38.14)
#> 2  POINT (-114.71 35.97)
#> 3  POINT (-118.17 37.93)
#> 4  POINT (-118.21 38.63)
#> 5  POINT (-115.62 39.08)
#> 6  POINT (-112.58 38.58)
#> 7  POINT (-112.04 38.71)
#> 8   POINT (-114.94 37.3)
#> 9   POINT (-113.3 37.61)
#> 10 POINT (-115.05 37.69)