Learn R Programming

sampSurf (version 0.7-6)

bboxCheck: Function to Check Spatial Bounding Boxes

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

bboxCheck(bbox)

Arguments

bbox

A matrix to be checked.

Value

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

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.

See Also

bbox

Examples

Run this code
# NOT RUN {
tract = Tract(c(x=20,y=20), cellSize=0.5)
bb = bbox(tract)
bboxCheck(bb)
# }

Run the code above in your browser using DataLab