bboxCheck: Function to Check Spatial Bounding Boxes

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/bboxCheck.R

Description

A bbox is not a formal class, but is used often enough in package sampSurf that a little routine to check for a valid one is useful. It could have been made a class, but it was not in the more basic sp and raster packages, and so was not introduced here.

Usage

1
bboxCheck(bbox)

Arguments

bbox

A matrix to be checked.

Details

A valid bbox matrix is 2x2, all numeric, and has row names c('x','y') and column names c('min','max') in package sampSurf. A check is also made for minima-maxima extents in the correct sense.

Value

The function returns true if the matrix passes all the checks, otherwise it stops with an error.

Author(s)

Jeffrey H. Gove

See Also

bbox

Examples

1
2
3
tract = Tract(c(x=20,y=20), cellSize=0.5)
bb = bbox(tract)
bboxCheck(bb)

sampSurf documentation built on March 5, 2021, 3:01 p.m.