Learn R Programming

oce (version 0.9-18)

topoInterpolate: Interpolate within a topography dataset

Description

Interpolate within a topography dataset

Usage

topoInterpolate(longitude, latitude, topo)

Arguments

longitude
longitude, or vector of longitudes (in the same sign convention as used in topo).
latitude
latitude, or vector of latitudes (in the same sign convention as used in topo).
topo
topography object, as e.g. loaded with data(topoWorld).

Value

  • A height (or vector of heights) giving the elevation of the earth above means sea level at the indicated location on the earth.

Details

Bilinear interpolation is used so that values will vary smoothly within a longitude-latitude grid cell. Note that the sign convention for longitude and latitude must match that in topo.

See Also

A topo object may be read with read.topo.

Examples

Run this code
library(oce)
data(topoWorld)
# "The Gully", approx. 400m deep, connects Gulf of St Lawrence with North Atlantic
topoInterpolate(45, -57, topoWorld)

Run the code above in your browser using DataLab