Skip to contents

splnr_get_boundary() allows to create an sf object of your planning region either based on specific coordinate information, or rnaturalearth inputs such as ocean data. Creating a boundary is often the first step in conservation planning and a requirement for downstream function sin spatialplanr.

Usage

splnr_get_boundary(Limits, Type = NULL, res = 1, cCRS = "ESRI:54009")

Arguments

Limits

The limits of the boundary. This can either be a 4 element numeric named vector (c(xmin = 150, xmax = 160, ymin = -40, ymax = -30)), a vector of ocean/sea names, or a vector of EEZs.,

Type

The type of Limits being provided. Options are "Ocean" or "EEZ". (not required if numeric or "Global" limits are provided)

res

The resolution (in degrees) from which to create the boundary polygon if numeric limits are provided.

cCRS

The CRS the boundary is to be returned in

Value

The boundary of the planning region

Examples

Bndry <- splnr_get_boundary(Limits = "North Atlantic Ocean", Type = "Ocean")
#> Reading layer `ne_10m_geography_marine_polys' from data source 
#>   `/private/var/folders/_r/mcmw_qtn0m7cd23cbdqfszl40000gp/T/RtmpmU1Uiz/ne_10m_geography_marine_polys.shp' 
#>   using driver `ESRI Shapefile'
#> Simple feature collection with 306 features and 37 fields
#> Geometry type: MULTIPOLYGON
#> Dimension:     XY
#> Bounding box:  xmin: -180 ymin: -85.19206 xmax: 179.9999 ymax: 90
#> Geodetic CRS:  WGS 84
Bndry <- splnr_get_boundary(Limits = "Global")
Bndry <- splnr_get_boundary(Limits = c("xmin" = 150, "xmax" = 170, "ymin" = -40, "ymax" = -20))