[R] Idetntifying nearest topographic contours to data points

sam.e sam.engwell at bristol.ac.uk
Fri Apr 15 18:18:58 CEST 2011

Hi there, 
I have two data sets, one of locations at different elevations (x,y,z) and
the other of points that make up topographic contours (also x,y,z). I have


where 'data2' are my measurement coordinates (x, y) and 'topocon' are my
topographic contours (x,y). While this gives me an output of the distance
from each data point to the nearest topographic contour point, I would also
like to output the 'z' value of the nearest topographic point to each data
point. Does anyone know how I could go about this?

Ideally what I would like to output is a matrix which has:
data elevation (data2$z)     distance to nearest contour    elevation of
nearest contour (topocon$z)

Any help would be much appreciated,

View this message in context: http://r.789695.n4.nabble.com/Idetntifying-nearest-topographic-contours-to-data-points-tp3452462p3452462.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list