Create a bounding box polygon Python object for use with gd_download(). The coordinates of the bounding box are expressed in WGS84 decimal degrees ("OGC:CRS84").

gd_bbox(...)

Arguments

...

One or more SpatRaster, SpatRasterCollection, SpatVector, SpatVectorProxy or SpatExtent objects (whose combined bounding box extent will be returned); or the following named numeric arguments: xmin/ymax/xmax/ymin. If these four limit arguments are not named they should be in the stated order.

Value

a list object describing a GeoJSON bounding rectangular polygon suitable for use as regions argument to gd_download() or gd_search()

Details

Expecting total of 4 bounding box arguments, If arguments are unnamed they should be in the following order: "xmin", "ymax", "xmax", "ymin".

Examples

gd_bbox(
  xmin = 5.744140,
  ymax = 50.18162,
  xmax = 6.528252,
  ymin = 49.44781
)
#> $type
#> [1] "Polygon"
#> 
#> $coordinates
#> $coordinates[[1]]
#> $coordinates[[1]][[1]]
#> [1]  5.74414 49.44781
#> 
#> $coordinates[[1]][[2]]
#> [1]  6.528252 49.447810
#> 
#> $coordinates[[1]][[3]]
#> [1]  6.528252 50.181620
#> 
#> $coordinates[[1]][[4]]
#> [1]  5.74414 50.18162
#> 
#> $coordinates[[1]][[5]]
#> [1]  5.74414 49.44781
#> 
#> 
#>