Learn R Programming

marmap (version 1.0.10)

as.SpatialGridDataFrame: Convert bathymetric data to a spatial grid

Description

Transforms an object of class bathy to a SpatialGridDataFrame object.

Usage

as.SpatialGridDataFrame(bathy)

Value

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

Arguments

bathy

an object of class bathy

Author

Benoit Simon-Bouhet

Details

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

See Also

as.xyz, as.bathy, as.raster

Examples

Run this code
# load Hawaii bathymetric data
data(hawaii)

# use as.SpatialGridDataFrame
sp.hawaii <- as.SpatialGridDataFrame(hawaii)

# Summaries
summary(hawaii)
summary(sp.hawaii)

# structure of the SpatialGridDataFrame object
str(sp.hawaii)

# Plots
plot(hawaii,image=TRUE,lwd=.2)
image(sp.hawaii)

Run the code above in your browser using DataLab