Closed sigmafelix closed 7 months ago
Unlike other mode setting in par_make_gridset, par_make_gridset(..., mode="grid_advanced") returns a list of SpatVector.
mode
par_make_gridset
par_make_gridset(..., mode="grid_advanced")
SpatVector
library(sf) library(terra) library(tigris) library(chopin) library(spatstat.random) set.seed(2024) # Read the nc example gpkg file from sf package nc <- st_read(system.file("gpkg/nc.gpkg", package = "sf")) nc <- st_transform(nc, 5070) # Sample clustered points using st_sample (input is sf) sampled_points <- st_sample(nc, type = "Thomas", mu = 3e-9, scale = 1000, kappa = 10) # grid merge grid_merge <- chopin::par_make_gridset(sampled_points, mode = "grid_advanced", nx = 24L, ny = 12L, grid_min_features = 30L, padding = 2e4) plot(sampled_points$geom, pch = 19, cex = 0.2) plot(grid_merge$padded$geometry, add = TRUE, border = "red", lwd = 2) class(grid_merge) # output is SpatVectors
Input and output are supposed to be the same class.
sessionInfo()
N/A: does not depend on local systems.
Error description
Unlike other
mode
setting inpar_make_gridset
,par_make_gridset(..., mode="grid_advanced")
returns a list ofSpatVector
.Reproducible code
Expected behavior
Input and output are supposed to be the same class.
sessionInfo()
resultsN/A: does not depend on local systems.