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 missing,ANY,ANY,ANY
spm_as_boundary(
  boundaries,
  boundary,
  patches = NULL,
  points = NULL,
  boundary_area = NULL,
  patch_area = NULL
)

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

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

# S4 method for 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 1 field
#> 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
#> 1   4 MULTIPOLYGON (((-59.36453 5...
#> 2   5 MULTIPOLYGON (((-55 53.75, ...
#> 3   6 MULTIPOLYGON (((-49.9269 49...
#> 4   7 MULTIPOLYGON (((-54.48779 4...
bounds <- spm_as_boundary(boundaries = sfa_boundaries,
                          boundary = "sfa")
plot(bounds)