View source: R/spatial_manipulation.R
wgtcat_gen | R Documentation |
Create weight category polygons from the intersection of multiple spatial polygons data frames. When combining overlapping designs, weight categories are the unique combinations of the sample frame (or stratification) identities from the designs. This takes a list of spatial polygons data frames which have a common variable containing their unique weighting identifier (e.g. three stratification schemes that all contain a variable named "wgt_cat" that holds the stratum identities) and intersects them to find the weight categories. This is extremely vulnerable to malformed/invalid geometry and so it is highly recommended that you use the argument makevalid = TRUE
to prompt the function to check and attempt to repair geometry as needed after every geoprocessing step. This is slower, but the intersections will almost certainly fail without it. If you are feeling especially paranoid, you can also use force = TRUE
to force repair actions even on valid geometry.
wgtcat_gen(
polygons,
idvar,
makevalid = TRUE,
force = FALSE,
verbose = FALSE,
scale = 1e+05
)
polygons |
List of spatial polygons data frames. These are the polygons to intersect and should be the same as the polygons used to draw the designs being combined. They must all have a the |
idvar |
Character string. The name of the variable found in every set of polygons that contains the polygon identities. |
makevalid |
Logical. If |
force |
Logical. This is passed to |
verbose |
Logical. If |
scale |
Numeric. A value to be passed to |
A spatial polygons data frame with the single variable "wgt_cat"
in the data slot containing the unique weight categories.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.