reproj_bbox: Reproject a bounding box

Description Usage Arguments Note Author(s)

View source: R/reproj_bbox.R

Description

Helper function used to reproject bounding boxes; setting the parameter 'enlarge' allows to choose if the new one would be the one which completely includes the original extent in the output projection, or if is simply the one obtained by reprojecting the upper-left and the lower-right corners.

Usage

1
reproj_bbox(bbox, in_proj, out_proj, enlarge = TRUE)

Arguments

bbox

The input bounding box (it can be a matrix obtained from sp::bbox(), or a numeric vector in the format (xmin, ymin, xmax, ymax)).

in_proj

(crs | character) crs of the input projection, or string coercible to it using sf::st_crs() (e.g., WKT or numeric EPSG code)

out_proj

crs crs of the output projection, or string coercible to it using sf::st_crs() (e.g., WKT or numeric EPSG code)

enlarge

'logical“ if TRUE, the reprojected bounding box is the one which completely include the original one; if FALSE, it is simply the one obtained by reprojecting the upper-left and the lower-right corners.

Note

License: GPL 3.0

Author(s)

Luigi Ranghetti, phD (2015) luigi@ranghetti.info


MODIStsp documentation built on Jan. 13, 2021, 11:18 a.m.