Description Usage Arguments Details Value Examples
This function obtains the m-surroundings by choosing the m-1 neighboring polygons. If there are more than (m-1) first order neighbors the algorithm chooses the polygons with the longest borderlines. **VIP** If there are less than (m-1) first order neighbors the corresponding m-surrounding is filled with second order neighbors in increasing order between centroid distances.
1 | m_surr_cbl(x = x, m = m, control = NULL)
|
x |
input sf object with polygons or multipolygons features |
m |
length of m-surrounding |
r |
maximum overlap between any two m-surroundings |
control |
Argumento opcional. Por definir |
AquĆ Antonio escribe una linda historia
REPASAR A list with four matrices: an m-surrounding matrix, named ms, whose rows correspond to the m-surroundings; a matrix, named msr, containing the m-surroundings with maximum overlapping of r; a matrix including the length of borderlines between m-surroundings and a distance matrix, named mdtms, whose rows correspond to distance between the elements of m-surroundings.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(sf)
fname <- system.file("shape/nc.shp", package="sf")
nc <- st_read(fname)
plot(sf::st_geometry(nc))
# VIP: THE THRESHOLD OF THE DISTANCE NEED TO BE VERY SMALL TO
# FIND M-SURROUNDINGS EXCEDING THE THRESHOLD.
lms3 <- m_surr_cbl(nc, m = 3, r = 1, control = list(dtmaxpc = 0.05))
lms5 <- m_surr_cbl(nc, m = 5, r = 2, control = list(dtmaxpc = 0.1))
dim(lms3$ms); dim(lms5$ms)
# m-surroundings or m-histories
lms3$ms[1:5, ]; lms5$ms[1:5, ]
# length between borderlines in m-surroundings
lms3$mscbl[1:5, ]; lms5$mscbl[1:3, ]
# Distances in m-surroundings
lms3$mdtms[1:5,]; lms5$mdtms[1:5,]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.