Converts a matrix of class bathy into a three-column data.frame containing longitude, latitude and depth data.
Usage
as.xyz(bathy)
Value
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.
Arguments
bathy
matrix of class bathy.
Author
Benoit Simon-Bouhet
Details
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.