aRTlayer-getOperation {aRT} | R Documentation

## getOperation

### Description

Returns some spatial operation that is not stored in the layer. It returns the result of this operation over each element.

### Usage

    ## S4 method for signature 'aRTlayer':
    getOperation(object, operation= c("centroid", "hull", "buffer"), ID = NULL, distance = NULL, as.sp = TRUE)

### Arguments

`object` | Object of class `aRTlayer`.
`operation` | One of: centroid hull buffer
`ID` | A subset of the layer's IDs, over which the metrics will be computed. In the case of `NULL`, `getMetric` calculates the metrics over each element of the layer.
`distance` | The distance, used only with buffer.
`as.sp` | A boolean value indicating whether the result should be a Spatial or an `aRTgeometry` object

.

### Author(s)

Pedro Ribeiro de Andrade

### See Also

See `aRTlayer-class` to the description of this class.

### Examples

    ## Not run:
    getOperation(layer, "hull")
    getOperation(layer, "buffer", dist=500)
    ## End(Not run)

[Package aRT version 1.7-1 Index]