<div dir="ltr"><div style="color:rgb(0,0,0);font-family:Calibri,sans-serif;font-size:14px;text-align:-webkit-auto">I am analyzing some animal tracking data and I have a problem that I am stumped by.  Imagine that we have a single animal track (created from satellite data received about once per hour), and that it wanders for many kilometers.  I would like to overlay a grid on the track (cell size about 500 m x 500m) and record a direction vector for every cell in the grid, which represents the direction that the animal was traveling when it passed through that cell.  I tried using v.to.rast with use=dir, which should create a directional vector in every raster cell that the track passes through, but it seems that the command does not respect the *order* of the track.  In other words, it seems that it was just as likely to classify a particular segment as having a direction of NE as it was to classify the same segment as SW (180 degrees opposite), and I couldn't see any consistency to how the directions were chosen, although I may have missed something.  There are a few other challenges, including that sometimes the animal re-crossed its own track so that a grid cell may contain more than one track.  In those cases I would want to sum the vectors (with regular vector addition).  I want to do a few other things as well, including finding the center of each grid cell and computing a direction vector that is orthogonal to some linear landscape feature—I only mention this in case rasters are not the right approach.   I am new to GRASS and a bit overwhelmed, and I would be very grateful for any suggestions that would get me started in the right general direction.    </div>
<div style="color:rgb(0,0,0);font-family:Calibri,sans-serif;font-size:14px;text-align:-webkit-auto"><br></div><div style="color:rgb(0,0,0);font-family:Calibri,sans-serif;font-size:14px;text-align:-webkit-auto">Thanks!</div>
<div><br></div></div>