mainDirection: Object orientation or main direction

View source: R/mainDirection.R

mainDirectionR Documentation

Object orientation or main direction

Description

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)

Usage

mainDirection(spdf, angle = "main", cores = 1, quiet = TRUE)

Arguments

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

Value

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

Note

  • 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.


raff-k/Lslide documentation built on March 29, 2022, 6:52 p.m.