extendByDist: Extend an object's extent by distance

View source: R/extendByDist.R

extendByDistR Documentation

Extend an object's extent by distance

Description

Similar to extend, this function extends the extent of an Extent, Raster* or Spatial* object. Rather than requiring the user to supply either a target extent or a desired number of columns and rows to add to the initial Raster*, extension is based on native map units, e.g. decimal degrees when the projection is EPSG:4326.

Usage

extendByDist(x, width)

Arguments

x

Extent, Raster* or Spatial* object.

width

Numeric. Distance to add to original geometry (in native map units). Can be of length 1 (applied equally in each direction), 2 (first entry applied in vertical direction, second entry in horizontal direction) or 4 (applied separately in bottom/left/top/right direction).

Value

An extended extent.

Author(s)

Florian Detsch

See Also

extend, extent

Examples

## initial extent (see ?gmap_hel)
data(gmap_hel)
extent(gmap_hel)

## extend by 0.1 degrees
extendByDist(gmap_hel, width = .1)


environmentalinformatics-marburg/Rsenal documentation built on July 28, 2023, 6:09 a.m.