File tree Expand file tree Collapse file tree 3 files changed +11
-12
lines changed
Expand file tree Collapse file tree 3 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import:
1212Imports:
1313 magrittr,
1414 stringr, purrr,
15- sf, stars,
15+ sf,
1616 terra,
1717 tidyselect,
1818 data.table, dplyr,
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ export(plot)
3030export(rast)
3131export(rast2SpatialGrid)
3232export(rast2colormap)
33- export(rast2poly)
3433export(rast_array)
3534export(rast_cellId)
3635export(rast_df)
Original file line number Diff line number Diff line change 55# as(r, "SpatialPolygonsDataFrame")
66# }
77
8- # ' @export
9- rast2poly <- function (r , crs = 4326 ) {
10- sf_poly <- suppressWarnings({
11- sf :: st_as_sf(stars :: st_as_stars(r ),
12- as_points = FALSE , merge = TRUE
13- ) %> % sf :: st_make_valid() # %>% sf::as_Spatial()
14- })
15- sf :: st_crs(sf_poly ) <- crs
16- sf_poly
17- }
8+ # # ' @export
9+ # rast2poly <- function(r, crs = 4326) {
10+ # sf_poly <- suppressWarnings({
11+ # sf::st_as_sf(stars::st_as_stars(r),
12+ # as_points = FALSE, merge = TRUE
13+ # ) %>% sf::st_make_valid() # %>% sf::as_Spatial()
14+ # })
15+ # sf::st_crs(sf_poly) <- crs
16+ # sf_poly
17+ # }
1818
1919
2020# ' @export
You can’t perform that action at this time.
0 commit comments