depth: Estimate Water Depth

View source: R/depth.R

depthR Documentation

Estimate Water Depth

Description

Returns an linearly interpolated estimate of water depth for a given a set of coordinates, based on a reference bathymetry map.

Usage

depth(x, ...)

## Default S3 method:
depth(longitude, latitude, units = "m")

## S3 method for class 'list'
depth(x, ...)

Arguments

longitude, latitude

Numerical vector of longitudes in decimal degree format.

units

Depth units to be returned. May be in meters (units = "meter"), feet (units = "ft" or units = "feet") or fathoms (units = "fth" or (units = "fathoms").

Details

The sign of longitude has no influence on the result.

Value

Returns a numerical vector the same size as latitude and longitude containing the water depth at the specified coordinates. Coordinates on land have negative values.

Methods (by class)

  • depth(default): Default depth function.

  • depth(list): Depth function for a list obejct.

Examples

   # Find the water depth at a single point:
   depth(63.8, 47.05)

   # Find water depth for multiple points:
   lat <- c(48, 47, 46.5)
   long <- c(-64, -61.5, -62)
   depth(long, lat)


TobieSurette/gulf.spatial documentation built on Sept. 26, 2024, 7:41 p.m.