bbox_lims: Get one-set of the bounding box

bbox_limsR Documentation

Get one-set of the bounding box

Description

Return either the x-axis limits or y-axis limits.

Usage

st_xlim(x)

## S3 method for class 'sf'
st_xlim(x)

## S3 method for class 'sfc'
st_xlim(x)

## S3 method for class 'bbox'
st_xlim(x)

st_ylim(x)

## S3 method for class 'sf'
st_ylim(x)

## S3 method for class 'sfc'
st_ylim(x)

## S3 method for class 'bbox'
st_ylim(x)

Arguments

x

(bbox/sfc/sf) Either a bounding box or a geometry.

Examples

library(sf)
data(states_map)

x <- st_xlim(states_map)
x

# The crs is preserved
st_crs(x)

seasmith/sfx documentation built on April 1, 2024, 2:36 p.m.