View source: R/dividePolygon.R
dividePolygon | R Documentation |
This function divides a polygon feature into n-party of approximatly the same area. The division is performed along the y-axis (N-S). Therefore, polygons should be rotated appropriate.
dividePolygon(x, angle = 0, n, trans = TRUE, btol = 1e-04, pgtol = 1e-09, maxit = 100, cores = 1, quiet = TRUE)
x |
object of class sf |
angle |
Can be one single value, or a vector with the same length as the input object x. North is 0 degree, and East 90. Default: 0 degree for North-South. For East-West use 90 degree. |
n |
number of parts |
trans |
angle input is transformed, so that N-S cutting is appropriate. Default: TRUE. |
btol |
tolerance value for lower and upper boundary in optim().Default: 0.0001 |
pgtol |
tolerance value to reduce the sum of residuals in optimizing function |
maxit |
maximum iteration to convergence in finding optimal points. Default: 100 |
cores |
number of cores for parallel processing. Default: 1 (sequential) |
quiet |
no outputs in console. Default: TRUE |
Geometry similar to sf input including divisions.
Algorithm does not find optimum if polygon split results in more objects than the given number n. This can happen when a polygon is very ragged.
Algorithm cut polygon on the N-S-Axis (0-180 degree). Therefore, trans is used to adapt the rotation angle so that cutting is appropriate.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.