Create a sspm_boundary object. A boundary object serves as a basis to encode the spatial extent of the model.

spm_as_boundary(
  boundaries,
  boundary,
  patches = NULL,
  points = NULL,
  boundary_area = NULL,
  patch_area = NULL
)

# S4 method for class 'missing,ANY,ANY,ANY'
spm_as_boundary(
  boundaries,
  boundary,
  patches = NULL,
  points = NULL,
  boundary_area = NULL,
  patch_area = NULL
)

# S4 method for class 'ANY,missing,ANY,ANY'
spm_as_boundary(
  boundaries,
  boundary,
  patches = NULL,
  points = NULL,
  boundary_area = NULL,
  patch_area = NULL
)

# S4 method for class 'sf,character,missing,missing'
spm_as_boundary(
  boundaries,
  boundary,
  patches = NULL,
  points = NULL,
  boundary_area = NULL,
  patch_area = NULL
)

# S4 method for class 'sf,character,ANY,ANY'
spm_as_boundary(
  boundaries,
  boundary,
  patches = NULL,
  points = NULL,
  boundary_area = NULL,
  patch_area = NULL
)

Arguments

boundaries

[sf] The sf object to cast.

boundary

[character] The column that contains the possible subdivisions of the boundaries.

patches

[sf] Patches resulting from discretization.

points

[sf] Sample points used for discretization.

boundary_area

[character] The column that contains the area of the subdivisions (optional).

patch_area

[character] The column that contains the area of the patches (optional).

Value

An object of class sspm_boundary or sspm_discrete_boundary.

Examples

sfa_boundaries
#> Simple feature collection with 4 features and 2 fields
#> Geometry type: MULTIPOLYGON
#> Dimension:     XY
#> Bounding box:  xmin: -64.18658 ymin: 46.00004 xmax: -46.6269 ymax: 60.84333
#> Geodetic CRS:  WGS 84
#>   sfa                       geometry               area
#> 1   4 MULTIPOLYGON (((-59.36453 5...  47575648300 [m^2]
#> 2   5 MULTIPOLYGON (((-55 53.75, ...  62857719164 [m^2]
#> 3   6 MULTIPOLYGON (((-49.9269 49... 178716060645 [m^2]
#> 4   7 MULTIPOLYGON (((-54.48779 4... 147799572836 [m^2]
bounds <- spm_as_boundary(boundaries = sfa_boundaries,
                          boundary = "sfa")
plot(bounds)