Skip to contents

Converts a range of spatial data formats into a matrix representing the bounding box

Usage

geo_bb_matrix(shp)

Arguments

shp

Spatial object

See also

Examples

geo_bb_matrix(routes_fast_sf)
#>           [,1]      [,2]
#> [1,] -1.550964 -1.510987
#> [2,] 53.802478 53.830414
geo_bb_matrix(cents_sf[1, ])
#>           [,1]      [,2]
#> [1,] -1.546463 -1.546463
#> [2,] 53.809517 53.809517
geo_bb_matrix(c(-2, 54))
#>      [,1] [,2]
#> [1,]   -2   -2
#> [2,]   54   54
geo_bb_matrix(sf::st_coordinates(cents_sf))
#>           [,1]      [,2]
#> [1,] -1.550806 -1.511861
#> [2,] 53.804098 53.828874