View source: R/reproject_gebco.R
reproject_gebco | R Documentation |
Reprojects GEBCO raster to a new extent, resolution, and coordinate reference system. Option to also calculate slope and aspect from the rasters.
reproject_gebco(
x,
z_varname = "elevation",
z_direction = -1,
raster_template = NULL,
extent = NULL,
resolution = NULL,
set_crs = NULL,
return_slope_aspect = FALSE,
interpolation_method = "bilinear",
slope_nn = 8,
slope_units = "degrees"
)
x |
Either a filepath to a GEBCO netCDF bathymetry file or a raster object. |
z_varname |
Name of the variable name for elevation/depth in the GEBCO raster. |
z_direction |
Direction for depth (negative one if positive depth is down) |
raster_template |
A terra SpatRaster that is used as the template for projecting the gebco_raster. In other words, the GEBCO bathymetry will be projected to the extent, resolution, and coordinate reference system of raster_template. Must provide raster_template OR extent, resolution, and CRS. |
extent |
Extent of for a raster_template as an sf object or 4L named numeric vector with names xmin, xmax, ymin, ymax (e.g. extent = c(xmn = -2075672, xmx = -149672.2, ymn = 427321.3, ymx = 2027321)). Must be provided if raster_template is not provided. |
resolution |
Resolution for a raster_template as a 2L numeric vector where values denote the x and y grid cell resolution. Must be provided if raster_template is not provided |
set_crs |
Coordinate reference system for the output. Uses the same crs as raster_template if not provided; must be provided if raster_template argument is not provided. |
return_slope_aspect |
Logical. Should slope and aspect also be returned in the output? |
interpolation_method |
Method for interpolating raster during reprojection. |
slope_nn |
Number of nearest neighbor cells to use for calculating slope (must be 4 or 8). |
slope_units |
Character vector denoting units for slope and aspect ("degrees" or "radians"). |
A rasterLayer object with bathymetry when return_slope_aspect argument is FALSE. If return_slope_argument is TRUE, returns a rasterLayer with seafloor_bathymetry, slope, and aspect.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.