is.empty {terra}R Documentation

Check if a SpatExtent or SpatVector is empty

Description

An empty SpatExtent has no area

An empty SpatVector has no geometries.

Usage

## S4 method for signature 'SpatExtent'
is.empty(x)

## S4 method for signature 'SpatVector'
is.empty(x)

Arguments

x

SpatVector or SpatExtent

Value

logical

Examples

e <- ext(0,0,0,0)
is.valid(e)
is.empty(e)

v <- vect()
is.valid(v)
is.empty(v)

[Package terra version 1.7-78 Index]