extent: Get extent of a variety of spatial objects

extentR Documentation

Get extent of a variety of spatial objects

Description

This is a wrapper around terra::ext, sf::st_bbox, and raster::extent.

Usage

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

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

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

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

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

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

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

Arguments

x

The spatial object from which to extract the extent.

...

Not used.

Value

Returns a list of length 4 with elements xmin, xmax, ymin, and ymax, in that order.


quickPlot documentation built on Aug. 8, 2025, 7:17 p.m.