as.raster: Convert bathymetric data to a raster layer

View source: R/as.raster.R

as.rasterR Documentation

Convert bathymetric data to a raster layer

Description

Transforms an object of class bathy to a raster layer.

Usage

as.raster(bathy)

Arguments

bathy

an object of class bathy

Details

as.raster transforms bathy objects into objects of class RasterLayer as defined in the raster package. All methods from the raster package are thus available for bathymetric data (e.g. rotations, projections...).

Value

An object of class RasterLayer with the same characteristics as the bathy object (same longitudinal and latitudinal ranges, same resolution).

Author(s)

Benoit Simon-Bouhet

See Also

as.xyz, as.bathy, as.SpatialGridDataFrame

Examples

# load Hawaii bathymetric data
data(hawaii)

# use as.raster
r.hawaii <- as.raster(hawaii)

# class "RasterLayer"
class(r.hawaii)

# Summaries
summary(hawaii)
summary(r.hawaii)

# structure of the RasterLayer object
str(r.hawaii)

## Not run: 
# Plots
#require(raster)
plot(hawaii,image=TRUE,lwd=.2)
plot(r.hawaii)

## End(Not run)

marmap documentation built on March 31, 2023, 6:59 p.m.

Related to as.raster in marmap...