artif_spo {stppSim} | R Documentation |
Artificial spatial origins
Description
Simulates spatial locations to serve as origins of walkers. If provided, spaces covered by restriction features are avoided. Final origins are assigned probability values indicating the strengths of the origins.
Usage
artif_spo(poly, n_origin=50, restriction_feat = NULL,
n_foci=5, foci_separation = 10, mfocal = NULL,
conc_type = "nucleated", p_ratio)
Arguments
poly |
(An sf or S4 object) a polygon shapefile defining the extent of the landscape |
n_origin |
number of locations to serve as
origins for walkers. Default: |
restriction_feat |
(An S4 object) optional
shapefile containing features
in which walkers cannot walk through.
Default: |
n_foci |
number of focal points amongst the origin
locations. The origins to serve as focal
points are based on random selection. |
foci_separation |
a value from |
mfocal |
the c(x, y) coordinates of a single point,
representing a pre-defined |
conc_type |
concentration of the rest of the
origins (non-focal origins) around the focal ones. The options
are |
p_ratio |
the smaller of the
two terms of proportional ratios.
For example, a value of |
Details
The focal origins (n_foci
) serve as the central locations
(such as, city centres). The foci_separation
indicates
the nearness of focal origins from one another.
The conc_type
argument allows a user to specify
the type of spatial concentration exhibited by the non-focal
origin around the focal ones.
If restriction_feat
is provided, its features help
to prevent the occurrence of any events in the areas
occupied by the features.
Value
Returns a list detailing the properties of the generated spatial origins with associated strength (probability) values.
Examples
#load boundary of Camden
load(file = system.file("extdata", "camden.rda",
package="stppSim"))
boundary = camden$boundary # get boundary
landuse <- camden$landuse
spo <- artif_spo(poly = boundary, n_origin = 50,
restriction_feat = landuse, n_foci=5, foci_separation = 0,
mfocal = NULL, conc_type = "dispersed", p_ratio=20)