Learn R Programming

RSurvey (version 0.5.0)

point.on.surface: Determine Point on Interpolated Surface

Description

This function determines the state variable corresponding to point locations within a gridded surface.

Usage

point.on.surface(x, y = NULL, z = NULL, px, py = NULL)

Arguments

x, y
numeric; locations of grid lines at which the values in z are measured. These must be in ascending order. If x is a list, its components x$x and x$y are used for x and y, respectively. If th
z
matrix; the state variable
px
numeric; a vector of x coordinates for the observation points. If px is a list, its components px$px and px$py are used for px and py, respectively.
py
numeric; a vector of y coordinates for the observation points.

Value

  • Returns a data frame containing the following components:
  • px, pynumeric; see Arguments section
  • pznumeric; a vector of z values corresponding to observation points within the gridded surface.

See Also

point.in.polygon

Examples

Run this code
data(project)
d <- srvy.dat("data.grd")
px <- c(-5.0, 0.0, 9.0)
py <- c(-5.0, 0.0, 0.0)
point.on.surface(x = d, px = px, py = py)

Run the code above in your browser using DataLab