Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

This is a version of a question that I posted on the GRASS list, but I didn't get any suggestions there. I would like to overlay a grid (cell size about 500 m x 500m) over an animal track created from hourly locations. For each cell that contains a track segment I want to record a direction vector which represents the direction that the animal was traveling when it passed through that cell.

I tried using the GRASS command "v.to.rast use=dir", which should create a directional vector in every raster cell that the track passes through. It almost works, but the command does not seem to respect the order of the track. It seems just as likely to classify a particular segment as having a direction of NE as 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. Another challenge is that the animal often re-crossed its own track so that individual grid cells may contain more than one track segment--in those cases I want to sum the direction vectors using regular vector algebra.

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.

Thanks!

share|improve this question
    
We can look at doing this with R easily enough if you can switch teams. But, what does sum mean for a direction, please expand on *why" you would do this? What is the goal? –  mdsumner May 22 at 13:33
    
R would be fine. By summing, I mean (to quote from Wolfram): "For two vectors A and B, the vector sum A+B is obtained by placing them head to tail and drawing the vector from the free tail to the free head. In Cartesian coordinates, vector addition can be performed simply by adding the corresponding components of the vectors, so if A=(a_1,a_2,...,a_n) and B=(b_1,b_2,...,b_n), A+B=(a_1+b_1,a_2+b_2,...,a_n+b_n)." As to the why, it's a rather complicated story but in short I want to statistically analyze the direction of movements in relation to landscape features. –  John May 23 at 7:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.