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

st_xlim(x)

# S3 method for sf
st_xlim(x)

# S3 method for sfc
st_xlim(x)

# S3 method for bbox
st_xlim(x)

st_ylim(x)

# S3 method for sf
st_ylim(x)

# S3 method for sfc
st_ylim(x)

# S3 method for 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
#> xmin xmax #> -124.68134 -67.00742 #> attr(,"class") #> [1] "xlim" #> attr(,"crs") #> Coordinate Reference System: #> User input: EPSG:4326 #> wkt: #> GEOGCS["WGS 84", #> DATUM["WGS_1984", #> SPHEROID["WGS 84",6378137,298.257223563, #> AUTHORITY["EPSG","7030"]], #> AUTHORITY["EPSG","6326"]], #> PRIMEM["Greenwich",0, #> AUTHORITY["EPSG","8901"]], #> UNIT["degree",0.0174532925199433, #> AUTHORITY["EPSG","9122"]], #> AUTHORITY["EPSG","4326"]]
# The crs is preserved st_crs(x)
#> Coordinate Reference System: NA