importRaster | R Documentation |
The function import the first layer of a generic raster file. Data are imported as an array of x, y, z columns.
importRaster(
file = file.choose(),
k = 1,
kz = 1,
dx = 0,
dy = 0,
destaggering = FALSE,
variable = NULL,
verbose = FALSE
)
file |
The raster file to be imported. |
k |
A numerical factor to be applied to x and y coordinates (default = 1). |
kz |
A numerical factor to be applied to z values (default = 1). |
dx |
Shifts x coordinates by dx (default = 0). |
dy |
float. Shift y coordinates by dy (default = 0). |
destaggering |
Use |
variable |
The name of the variable to be imported. |
verbose |
If |
Supported files include those managed by the raster package (as netcdf),
Destaggering is useful for importing data from the SPRAY model and it is not applied by default.
An optional summary output can be printed by setting the verbose
parameter.
This function is based on the terra
package and it can import any format
managed by it.
It returns a dataframe with x, y and z columns.
importADSOBIN()
, importSurferGrd()
## Not run:
# Import binary (netcdf) file and convert coordinates from km to m,
# without destaggering:
mydata <- importRaster(file = "/path_to_file/filename.nc",
k = 1000,
destaggering = FALSE)
# Import binary (netcdf) file and convert coordinates from km to m,
# with shift of 100 m in both directions:
mydata <- importRaster(file = "/path_to_file/filename.nc",
k = 1000,
dx = 100,
dy = 100)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.