bct: Boundary Convexity Tool

Description Usage Arguments Details Value Reference Examples

View source: R/BCT.R

Description

Calculates raw convexity, convexity index, and sinuosity of a given sf object and returns a data frame with all measurements for each step and feature. If provided, the data will also be output to a tab delimited file.

Usage

1
bct(sfDataObject, step, window, ridName = NULL, filename = "")

Arguments

sfDataObject

An sf Object containing shape file data.

step

A numeric describing the distance between measurements along an arc.

window

A numeric describing the diameter of the window used to measure convexity.

ridName

A character denoting the column name where the unique ID for each feature is stored in given sf object.

filename

A character denoting the name of the file you wish to output convexity data to in tab delimited format. Must have the .txt extension.

Details

This function will reject any sf object with a geographic coordinate system, so consider projecting your features. Your sf object must be of either type LINESTRING, MULTILINESTRING, POLYGON, or MULTIPOLYGON. If a given POLYGON or MUTLIPOLYGON contains inner rings, they will be ignored. If a unique ID Column name is not provided, the function will generate a unique ID for each feature. The arguments step and window can be any non-negative numeric. The argument ridName MUST be a character indicating the name of the column in your sf object where the route id is stored.

Value

The output of this function is a data.frame that contains all measurements for each step and feature.

Reference

Albeke, S.E. et al. “Measuring boundary convexity at multiple spatial scales using a linear “moving window” analysis: an application to coastal river otter habitat selection.” Landscape Ecology 25 (2010): 1575-1587. [linked phrase](https://link.springer.com/article/10.1007/s10980-010-9528-4)

Examples

1
2
3
4
library(rLFT)
data("shpObject")
#store convexity output data in a variable 'outputTable'
outputTable <- bct(shpObject, step = 50, window = 100, ridName = "RID")

rLFT documentation built on Sept. 24, 2021, 9:07 a.m.