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 1082 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
#> # A tibble: 1,082 × 10
#>    id         lat   lon   azi   unc type  depth quality regime
#>  * <chr>    <dbl> <dbl> <dbl> <dbl> <chr> <dbl> <fct>   <chr> 
#>  1 wsm07786  35.7 -120.    36     1 HF      1.3 A       S     
#>  2 wsm11750  32.9 -116.     7     1 FMF     7   A       S     
#>  3 wsm11759  33.0 -116.   169     1 FMF     5   A       S     
#>  4 wsm11782  33.2 -116.     1     1 FMF     8   A       S     
#>  5 wsm11801  33.9 -116.    23     1 FMF     6   A       S     
#>  6 wsm11830  33.5 -116.   160     1 FMF     9   A       S     
#>  7 wsm11842  34.1 -117.     4     1 FMF     6   A       S     
#>  8 wsm11854  34.1 -117.   180     1 FMF     7   A       S     
#>  9 wsm11863  34.2 -117.   176     1 FMF    10   A       S     
#> 10 wsm11892  33.9 -117.   178     1 FMF    13   A       S     
#> # ℹ 1,072 more rows
#> # ℹ 1 more variable: geometry <POINT [°]>