[R-sig-Geo] Interpolating along an XY path

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Wed Apr 12 23:50:07 CEST 2006


Rob Schick wrote:
> I have a series of x,y coordinates that represent a movement path of a
> tagged animal. I want to regularize the track, but approx interpolates over
> the range of x's as opposed to treating the track as an ordered sequence.
> I've tried coercing it into a time series, but this only seems to work when
> the X's constantly increase.

What exactly do you mean by 'regularize'?

  Have you got (x,y,t) data for spotting an animal at point (x,y) at 
time t where t is irregular, and you want to 'regularize' in t? Or do 
you want to regularize in space, so you end up with points all the same 
distance apart? That might not be possible depending on the spacing of 
your points...

  I think you're going to end up interpolating between pairs of points. 
Its quite easy to interpolate points between (x0,y0) and (x1,y1), the 
coords are just (x0+(1:N)*dx, y0+(1:N)*dy) where dx is (x1-x0)/N and 
similarly for y. Or I might be one off there...

Barry




More information about the R-sig-Geo mailing list