st_bbox

0th

Percentile

Return bounding of a simple feature or simple feature set

Return bounding of a simple feature or simple feature set

Keywords
datasets
Usage
# 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, ...)

Arguments
x

object of class bbox

obj

object to compute the bounding box from

...

for format.bbox, passed on to format to format individual numbers

crs

object of class crs, or argument to st_crs, specifying the CRS of this bounding box.

Details

NA_bbox_ represents the missing value for a bbox object

Value

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.

Format

An object of class bbox of length 4.

Aliases
  • st_bbox
  • is.na.bbox
  • st_bbox.POINT
  • st_bbox.MULTIPOINT
  • st_bbox.LINESTRING
  • st_bbox.POLYGON
  • st_bbox.MULTILINESTRING
  • st_bbox.MULTIPOLYGON
  • st_bbox.GEOMETRYCOLLECTION
  • st_bbox.MULTISURFACE
  • st_bbox.MULTICURVE
  • st_bbox.CURVEPOLYGON
  • st_bbox.COMPOUNDCURVE
  • st_bbox.POLYHEDRALSURFACE
  • st_bbox.TIN
  • st_bbox.TRIANGLE
  • st_bbox.CIRCULARSTRING
  • st_bbox.sfc
  • st_bbox.sf
  • st_bbox.Spatial
  • st_bbox.Raster
  • st_bbox.Extent
  • st_bbox.numeric
  • NA_bbox_
  • format.bbox
Examples
# NOT RUN {
a = st_sf(a = 1:2, geom = st_sfc(st_point(0:1), st_point(1:2)), crs = 4326)
st_bbox(a)
st_as_sfc(st_bbox(a))
st_bbox(c(xmin = 16.1, xmax = 16.6, ymax = 48.6, ymin = 47.9), crs = st_crs(4326))
# }
Documentation reproduced from package sf, version 0.9-4, License: GPL-2 | MIT + file LICENSE

Community examples

Looks like there are no examples yet.