Skip to content
Prev 2895 / 29559 Next

How to find ocean depth at specific locations?

Thank you very much.  I think I've made progress, but am now stuck....

I now have two data frames (sample appended below).  I would like to
find the indices of 'Depth' on locations in 'Scallop' so I can add
'depth' as a covariate at each sample location in 'Scallop'.

Two issues arise when I try code adapted from your example.

1) The code below generates an error message, when I try to find the
indices of 'Depth' at locations in 'Scallop'.
Error in function (classes, fdef, mtable)  :
  unable to find an inherited method for function "overlay", for
signature "SpatialPointsDataFrame", "SpatialPointsDataFrame"

2) The code below first plots the points from Scallop, then draws
Depth (color image) which covers(obscures) the points drawn
previously.

spplot(Depth, "depth", sp.layout= list("sp.points", Scallop))
  -
2) The code below generates an error message, when I try to find the
indices of 'Depth' at locations in 'Scallop'.
Error in function (classes, fdef, mtable)  :
  unable to find an inherited method for function "overlay", for
signature "SpatialPointsDataFrame", "SpatialPointsDataFrame"
coordinates depth
7  (593.212, 4539.22)    10
22 (614.239, 4539.51)     4
23 (615.643, 4539.53)     6
24 (617.048, 4539.56)     8
25 (618.444, 4539.58)     8
coordinates tcatchp1
1 (792.142, 4494.53)        1
2 (795.331, 4485.39)        1
3 (778.164, 4490.29)        1
4 (767.395, 4475.07)        2
5 (773.325, 4467.87)        1

Thanks.  --Dale
On Dec 2, 2007 4:26 PM, Paul Hiemstra <p.hiemstra at geo.uu.nl> wrote: