read.bathy: Read bathymetric data in XYZ format

View source: R/read.bathy.R

read.bathyR Documentation

Read bathymetric data in XYZ format

Description

Reads a three-column table containing longitude (x), latitude (y) and depth (z) data.

Usage

read.bathy(xyz, header = FALSE, sep = ",", ...)

Arguments

xyz

three-column table with longitude (x), latitude (y) and depth (z) (no default)

header

whether this table has a row of column names (default = FALSE)

sep

character separating columns, (default=",")

...

further arguments to be passed to read.table()

Details

Allows direct import of data from the NOAA GEODAS Grid Translator webpage (https://maps.ngdc.noaa.gov/viewers/wcs-client/). To prepare data from NOAA, fill the custom grid form, and choose "XYZ (lon,lat,depth)" as the "Output Grid Format", "No Header" as the "Output Grid Header", and either of the space, tab of comma as the column delimiter (either can be used, but "comma" is the default import format of read.bathy). Choose "omit empty grid cells" to reduce memory usage.

Value

The output of read.bathy is a matrix of class bathy, which dimensions depends on the resolution of the grid uploaded from the NOAA GEODAS server (Grid Cell Size). The class bathy has its own methods for summarizing and ploting the data.

Author(s)

Eric Pante

See Also

summary.bathy, plot.bathy, readGEBCO.bathy

Examples

# load NW Atlantic data
data(nw.atlantic)

# write example file to disk
write.table(nw.atlantic, "NW_Atlantic.csv", sep=",", quote=FALSE, row.names=FALSE)

# use read.bathy
read.bathy("NW_Atlantic.csv", header=TRUE) -> atl

# remove temporary file
system("rm NW_Atlantic.csv") # remove file, for unix-like systems

# class "bathy"
class(atl)

# summarize data of class "bathy"
summary(atl)


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

Related to read.bathy in marmap...