Closed loreabad6 closed 1 month ago
Thanks for picking this up, the CRS print, along with the warning, has been fixed
library(cubble)
#> Registered S3 method overwritten by 'tsibble':
#> method from
#> as_tibble.grouped_df dplyr
#>
#> Attaching package: 'cubble'
#> The following object is masked from 'package:stats':
#>
#> filter
library(tsibble)
#> Warning: package 'tsibble' was built under R version 4.3.3
#>
#> Attaching package: 'tsibble'
#> The following objects are masked from 'package:cubble':
#>
#> index, index_var, is_tsibble
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, union
library(sf)
#> Warning: package 'sf' was built under R version 4.3.2
#> Linking to GEOS 3.11.0, GDAL 3.5.3, PROJ 9.1.0; sf_use_s2() is TRUE
sf_nested <- make_cubble(
spatial = stations_sf, temporal = meteo,
key = id, index = date)
sf_nested |> sf::st_transform(crs = "EPSG:3857")
#> # cubble: key: id [3], index: date, nested form, [sf]
#> # spatial: [16122635.62, -4576600.87, 16152057.36, -4532279.36], WGS 84 /
#> # Pseudo-Mercator
#> # temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
#> id elev name wmo_id long lat geometry ts
#> <chr> <dbl> <chr> <dbl> <dbl> <dbl> <POINT [m]> <list>
#> 1 ASN00086038 78.4 essen… 95866 145. -37.7 (16130929 -4541016) <tibble>
#> 2 ASN00086077 12.1 moora… 94870 145. -38.0 (16152057 -4576601) <tibble>
#> 3 ASN00086282 113. melbo… 94866 145. -37.7 (16122636 -4532279) <tibble>
Created on 2024-07-09 with reprex v2.1.0
That's great! Thanks Sherry!
When doing a
st_transform()
on a cubble the projection transformation works as expected but a warning is displayed as if usingst_crs<-
. This seems to be called in the print method and also resulting in the wrong CRS name in the# spatial
line in the header.For reference, when the original sf is transformed this does not happen.