Produce a grains of connectivity (GOC) model at multiple scales (resistance thresholds) by scalar analysis. Patch-based or lattice GOC modelling can be done with this function.

GOC(x, ...)

# S4 method for mpg
GOC(x, nThresh = NULL, doThresh = NULL,
weight = "lcpPerimWeight", verbose = 0, ...)

## Arguments

x A mpg object produced by MPG. For lattice GOC MPG must be run with patch set as an integer value. Additional arguments (not used). Optional. An integer giving the number of thresholds (or scales) at which to create GOC models. Thresholds are selected to produce a maximum number of unique grains (i.e., models). nThresh thresholds are also approximately evenly spread between 0 and the threshold at which all patches or focal points on the landscape are connected. This is a simple way to get a representative subset of all possible GOC models. Provide either nThresh or doThresh not both. Optional. A vector giving the link thresholds at which to create GOC models. Use link{threshold} to identify thresholds of interest. Provide either nThresh or doThresh not both. A string giving the link weight or attribute to use for threshold. "lcpPerimWeight" uses the accumulated resistance or least-cost path distance from the perimeters of patches as the link weight. "eucPerimWeight" use the Euclidean distance from the perimeters of patches as the link weight. Set verbose=0 for no progress information to console.

## Value

A goc object.

## Details

Grain or scalar analysis of connectivity may be appropriate for a variety of purposes, not limited to visualization and improving connectivity estimates for highly-mobile organisms. See Galpern et al. (2012), Galpern & Manseau (2013a, 2013b) for applications and review of these capabilities.

## Note

Researchers should consider whether the use of a patch-based GOC or a lattice GOC model is appropriate based on the patch-dependency of the organism under study. Patch-based models make most sense when animals are restricted to, or dependent on, a resource patch. Lattice models can be used as a generalized and functional approach to scaling resistance surfaces.

See MPG for warning related to areal measurements.

## References

Fall, A., M.-J. Fortin, M. Manseau, D. O'Brien. (2007) Spatial graphs: Principles and applications for habitat connectivity. Ecosystems 10:448:461.

Galpern, P., M. Manseau. (2013a) Finding the functional grain: comparing methods for scaling resistance surfaces. Landscape Ecology 28:1269-1291.

Galpern, P., M. Manseau. (2013b) Modelling the influence of landscape connectivity on animal distribution: a functional grain approach. Ecography 36:1004-1016.

Galpern, P., M. Manseau, A. Fall. (2011) Patch-based graphs of landscape connectivity: a guide to construction, analysis, and application for conservation. Biological Conservation 144:44-55.

Galpern, P., M. Manseau, P.J. Wilson. (2012) Grains of connectivity: analysis at multiple spatial scales in landscape genetics. Molecular Ecology 21:3996-4009.

MPG, grain, distance, point

## Examples

## Load raster landscape
tiny <- raster::raster(system.file("extdata/tiny.asc", package = "grainscape"))

## Create a resistance surface from a raster using an is-becomes reclassication
tinyCost <- raster::reclassify(tiny, rcl = cbind(c(1, 2, 3, 4), c(1, 5, 10, 12)))

## Produce a patch-based MPG where patches are resistance features=1
tinyPatchMPG <- MPG(cost = tinyCost, patch = (tinyCost == 1))

## Extract a representative subset of 5 grains of connectivity
tinyPatchGOC <- GOC(tinyPatchMPG, nThresh = 5)

## Examine the properties of the GOC graph of grain 3 of 5
graphdf(grain(tinyPatchGOC, whichThresh = 3))#> [[1]]
#> [[1]]$v #> name polygonId centroidX centroidY polygonArea totalPatchArea #> 1 9 9 82.775739 30.824978 1117 80 #> 2 14 14 91.982587 6.067164 201 26 #> 3 1 1 31.441401 71.328875 2355 349 #> 4 13 13 55.800797 12.209163 502 32 #> 5 8 8 40.915855 33.420723 719 88 #> 6 2 2 72.141353 87.096043 1567 202 #> 7 7 7 11.853001 32.207019 983 68 #> 8 12 12 22.657810 12.435588 621 42 #> 9 5 5 92.944795 58.755521 317 6 #> 10 4 4 8.658451 58.595070 284 9 #> 11 15 15 64.756757 3.216216 74 2 #> 12 11 11 60.324561 33.085965 285 15 #> 13 6 6 73.349741 51.795337 193 4 #> 14 3 3 60.669856 71.672249 418 2 #> 15 17 17 76.169643 4.223214 112 2 #> 16 16 16 36.820000 3.692000 125 2 #> 17 10 10 96.468504 35.633858 127 3 #> totalPatchEdgeArea totalCoreArea #> 1 80 0 #> 2 26 0 #> 3 336 13 #> 4 32 0 #> 5 84 4 #> 6 197 5 #> 7 68 0 #> 8 39 3 #> 9 6 0 #> 10 9 0 #> 11 2 0 #> 12 15 0 #> 13 4 0 #> 14 2 0 #> 15 2 0 #> 16 2 0 #> 17 3 0 #> patchId #> 1 68, 80, 86 #> 2 100 #> 3 5, 7, 22, 30, 32, 37, 40, 41, 48, 54, 55, 56 #> 4 95, 103 #> 5 67, 85 #> 6 8, 9, 12, 14, 19, 28, 29, 31 #> 7 62, 64, 74, 84 #> 8 93 #> 9 60 #> 10 50 #> 11 105 #> 12 76 #> 13 61 #> 14 46 #> 15 107 #> 16 106 #> 17 73, 78 #> #> [[1]]$e
#> 1   9 14        55              34        55              34         55.0
#> 2  14 17        54              35        54              35         54.0
#> 3   1  4       135              74        55              36         95.0
#> 4   1 11        64              37        64              37         64.0
#> 5   1  6        59              38        59              38         59.0
#> 6  13 15        75              41        65              39         70.0
#> 7   8 11        95              60        75              42         85.0
#> 8   1  8        95              59        75              43         75.0
#> 9   1  2       107              62        70              48         76.0
#> 10  7 12        80              47        80              47         80.0
#> 11  2  3       220              89        81              49        140.0
#> 12  9 17        85              51        85              51         85.0
#> 13 12 16        85              52        85              52         85.0
#> 14 13  8        85              55        85              55         85.0
#> 15  5 10        88              58        88              58         88.0
#> 16  7  4       133              79       105              61        119.0
#> 17 15 17       105              63       105              63        105.0
#> 18  8 12       146              81       105              65        125.5
#> 19  1  3       132              78       100              66        127.0
#> 20  9 10       129              72       114              67        121.5
#> 21 13 16       125              76       115              68        120.0
#> 22 13 12       115              69       115              69        115.0
#> 23  9  5       130              70       130              70        130.0
#> 24 13 11       123              71       123              71        123.0
#> 25  9  6       210              88       123              73        166.5
#> 26  9 11       144              80       144              80        144.0
#> 27  2  5       290              90       162              83        226.0
#> 28 11  6       200              84       200              84        200.0
#> 29 13 17       195              85       195              85        195.0
#> 30  9 13       208              86       208              86        208.0
#> 31  6  3       365              91       365              91        365.0
#> 32  9  2       358              92       358              92        358.0
#> 33  2  6       432              93       432              93        432.0
#> 1    55.00000              1         34          26.41430
#> 2    54.00000              1         35          15.92009
#> 3    95.00000              2     36, 74          26.10005
#> 4    64.00000              1         37          47.92449
#> 5    59.00000              1         38          46.23709
#> 6    70.00000              2     39, 41          12.69182
#> 7    85.00000              2     42, 60          19.41159
#> 8    81.66667              3 43, 44, 59          39.07420
#> 9    84.33333              3 45, 48, 62          43.64733
#> 10   80.00000              2     47, 53          22.53117
#> 11  147.00000              3 49, 82, 89          19.22209
#> 12   85.00000              1         51          27.40975
#> 13   85.00000              1         52          16.64386
#> 14   85.00000              1         55          25.91316
#> 15   88.00000              1         58          23.38863
#> 16  119.00000              2     61, 79          26.58071
#> 17  105.00000              1         63          11.45723
#> 18  125.50000              2     65, 81          27.81604
#> 19  119.66667              3 66, 77, 78          29.23047
#> 20  121.50000              2     67, 72          14.51266
#> 21  120.00000              2     68, 76          20.80415
#> 22  115.00000              1         69          33.14376
#> 23  130.00000              1         70          29.72415
#> 24  123.00000              1         71          21.36130
#> 25  166.50000              2     73, 88          22.99142
#> 26  144.00000              1         80          22.56474
#> 27  226.00000              2     83, 90          35.15634
#> 28  200.00000              1         84          22.79684
#> 29  195.00000              1         85          21.87842
#> 30  208.00000              2     86, 87          32.77493
#> 31  365.00000              1         91          23.57692
#> 32  358.00000              1         92          57.26712
#> 33  432.00000              1         93          35.32138
#>
#>
## Extract grains of connectivity
## representation of the finest grain and three others
## by giving thresholds in link weights (doThresh)
tinyPatchGOC <- GOC(tinyPatchMPG, doThresh = c(0, 20, 40))