bbox: Bounding box and extent methods for NetLogoR classes

extent,worldNLR-methodR Documentation

Bounding box and extent methods for NetLogoR classes

Description

Same as sp::bbox() and raster::extent().

Usage

## S4 method for signature 'worldNLR'
extent(x, ...)

## S4 method for signature 'agentMatrix'
extent(x, ...)

.bboxCoords(coords)

## S4 method for signature 'agentMatrix'
bbox(obj)

bbox(obj) <- value

## S4 replacement method for signature 'agentMatrix,matrix'
bbox(obj) <- value

## S4 method for signature 'worldNLR'
bbox(obj)

Arguments

x

Raster* or Extent object, a matrix, a bbox, or a vector of four numbers

...

Additional arguments. When x is a single number representing 'xmin', you can pass three additional numbers (xmax, ymin, ymax)

When x is a Raster* object, you can pass four additional arguments to crop the extent: r1, r2, c1, c2, representing the first and last row and column number

coords

xy coordinates for all cells, e.g., produced by raster::coordinates.

obj

object deriving from class "Spatial", or one of classes: "Line", "Lines", "Polygon" or "Polygons", or ANY, which requires obj to be an array with at least two columns

value

2x2 matrix representing the bounding box. See sp::bbox().

Value

bbox returns a two-column matrix; the first column has the minimum, the second the maximum values; rows represent the spatial dimensions. extent returns an extent object.

two-column matrix; the first column has the minimum, the second the maximum values; rows represent the spatial dimensions. See sp::bbox().


NetLogoR documentation built on Aug. 17, 2022, 9:06 a.m.