Return bounding of a simple feature or simple feature set
# S3 method for bbox is.na(x) st_bbox(obj, ...) # S3 method for POINT st_bbox(obj, ...) # S3 method for MULTIPOINT st_bbox(obj, ...) # S3 method for LINESTRING st_bbox(obj, ...) # S3 method for POLYGON st_bbox(obj, ...) # S3 method for MULTILINESTRING st_bbox(obj, ...) # S3 method for MULTIPOLYGON st_bbox(obj, ...) # S3 method for GEOMETRYCOLLECTION st_bbox(obj, ...) # S3 method for MULTISURFACE st_bbox(obj, ...) # S3 method for MULTICURVE st_bbox(obj, ...) # S3 method for CURVEPOLYGON st_bbox(obj, ...) # S3 method for COMPOUNDCURVE st_bbox(obj, ...) # S3 method for POLYHEDRALSURFACE st_bbox(obj, ...) # S3 method for TIN st_bbox(obj, ...) # S3 method for TRIANGLE st_bbox(obj, ...) # S3 method for CIRCULARSTRING st_bbox(obj, ...) # S3 method for sfc st_bbox(obj, ...) # S3 method for sf st_bbox(obj, ...) # S3 method for Spatial st_bbox(obj, ...) # S3 method for Raster st_bbox(obj, ...) # S3 method for Extent st_bbox(obj, ..., crs = NA_crs_) # S3 method for numeric st_bbox(obj, ..., crs = NA_crs_) NA_bbox_ # S3 method for bbox format(x, ...)
| x | object of class |
|---|---|
| obj | object to compute the bounding box from |
| ... | for format.bbox, passed on to format to format individual numbers |
| crs | object of class |
An object of class bbox of length 4.
a numeric vector of length four, with xmin, ymin, xmax
and ymax values; if obj is of class sf, sfc, Spatial or Raster, the object
returned has a class bbox, an attribute crs and a method to print the
bbox and an st_crs method to retrieve the coordinate reference system
corresponding to obj (and hence the bounding box). st_as_sfc has a
methods for bbox objects to generate a polygon around the four bounding box points.
NA_bbox_ represents the missing value for a bbox object
#> xmin ymin xmax ymax #> 0 1 1 2#> Geometry set for 1 feature #> geometry type: POLYGON #> dimension: XY #> bbox: xmin: 0 ymin: 1 xmax: 1 ymax: 2 #> CRS: EPSG:4326#>#> xmin ymin xmax ymax #> 16.1 47.9 16.6 48.6