View source: R/mainDirection.R
mainDirection | R Documentation |
This function calculates the object orientation (or main direction) for SpatialPolygonsDataFrame objects in xy-space. For this, a principal component analysis is performed according to YI & MARSHALL (2000)
mainDirection(spdf, angle = "main", cores = 1, quiet = TRUE)
spdf |
SpatialPolygonsDataFrame input |
angle |
angle taken for output. Default: "main" (alternative: "weighted main") |
cores |
number of cores for parallel processing. Default: 1 (sequential) |
quiet |
no outputs in console. Default: TRUE |
data.table containing the ID field, a column (angle) containing the object orientations, and a column (angle_inv) contaning the inverse object orientations. Both object orientations are necessairy due to the ambiguity of the orientation in xy-space without fix starting point
for the principal component analysis the princomp
function is used
SpatialPolygonsDataFrame input must have an ID field with unique numbers
YI, W.& S. MARSHALL (2000): Principal component analysis in application to object orientation. Geo-spatial Information Science, 3(3), 76-78.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.