0

I use extract() to get bilinear interpolated points out of my raster-object. Is there a way to show intermediate steps of the interpolation? I would be interested in the coordinates and values of the nearest four grid-points and the distances to my interpolation point.

With r = raster(...) and spdf = SpatialPointsDataFrame() my function call is the following:

out <- extract(r, spdf, method="bilinear")
moremo
  • 315
  • 2
  • 11

1 Answers1

0

You can run the code in raster:::.bilinearValue line by line, with raster = r; xyCoords = coordinates(spdf); layer=1, n=1

Robert Hijmans
  • 40,301
  • 4
  • 55
  • 63