as.xyz | R Documentation |
Converts a matrix of class bathy
into a three-column data.frame containing longitude, latitude and depth data.
as.xyz(bathy)
bathy |
matrix of class |
The use of as.bathy
and as.xyz
allows to swicth back and forth between the long format (xyz) and the wide format of class bathy
suitable for plotting bathymetric maps, computing least cost distances, etc. as.xyz
is especially usefull for exporting xyz files when data are obtained using subsetSQL
, i.e. bathymetric matrices of class bathy
.
Three-column data.frame with a format similar to xyz files downloaded from the NOAA GEODAS Grid Translator webpage (https://maps.ngdc.noaa.gov/viewers/wcs-client/). The first column contains longitude data, the second contains latitude data and the third contains depth/elevation data.
Benoit Simon-Bouhet
as.bathy
, summary.bathy
# load celt data
data(celt)
dim(celt)
class(celt)
summary(celt)
plot(celt,deep= -300,shallow= -25,step=25)
# use as.xyz
celt2 <- as.xyz(celt)
dim(celt2)
class(celt2)
summary(celt2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.