Learn R Programming

terra (version 1.7-55)

is.empty: 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 SpatExtent
is.empty(x)

# S4 method for SpatVector is.empty(x)

Value

logical

Arguments

x

SpatVector or SpatExtent

Examples

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

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

Run the code above in your browser using DataLab