st_transform.sr_obs.Rd
Transform the underlying sf
object and all the MC replicas,
if any.
# S3 method for sr_obs st_transform(x, crs, ...)
x | A |
---|---|
crs | Coordinate reference system: inteer with the EPSG code or character with proj4string |
... | Ignored |
A sr_obs
object in the target projection.
## Some observed data and MC replicates in longitude/latitude x <- sr_obs(data.frame(lat = 1, lon = 1, day = 1), "day", uq = sr_uq(2, 1, 1)) st_crs(x)#> Coordinate Reference System: #> EPSG: 4326 #> proj4string: "+proj=longlat +datum=WGS84 +no_defs"#> [[1]] #> Coordinate Reference System: #> EPSG: 4326 #> proj4string: "+proj=longlat +datum=WGS84 +no_defs" #> #> [[2]] #> Coordinate Reference System: #> EPSG: 4326 #> proj4string: "+proj=longlat +datum=WGS84 +no_defs" #>xt <- st_transform(x, 3857) st_crs(xt)#> Coordinate Reference System: #> EPSG: 3857 #> proj4string: "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"#> [[1]] #> Coordinate Reference System: #> EPSG: 3857 #> proj4string: "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs" #> #> [[2]] #> Coordinate Reference System: #> EPSG: 3857 #> proj4string: "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs" #>