[GRASS-user] shortest distance using cost between centroid/lines

Brandon M. Gabler bgabler at email.arizona.edu
Sun Apr 8 17:22:21 EDT 2007


A problem with which I am currently working relates to the r.walk  
feature, for calculating anisotropic movement cost between two  
points, and v.distance, for calculating the shortest distance between  
my archaeological sites (areas) and river drainages (represented as  
lines). I could convert everything to raster data, if that improves  
the ability to calculate what I am interested in, but that's a  
different story, and not worth noting right now...what I need to do  
has not been described by any of the available examples and  
questions, or maybe I am still not comprehending how to do it  
properly, but here is the issue:

I want to find the shortest distance between an archaeological site  
and a drainage. I do NOT want to specify to which drainage one should  
look from each site, because I want it to be the least cost to get to  
a source of water. I suppose that technically I would not NEED  
anisotropic modeling, because the trips would be round trip, but I  
still would prefer to do this with anisotropic distances because down  
the road I may want distances calculated from one site, to a  
drainage, to a different site, and back to the original site (for  
example, total shortest distance from a pueblo to a river to a grid  
garden back to the pueblo).

Therefore, the requirement of r.walk and r.cost to specify start/stop  
points is not good for me.

Obviously, first I need a cost surface. For ease of argument, I'm  
going to stick with slope and only slope right now. So, I have these  
data:

All_sites - vector, polygons of sites (I also have a point version of  
this map, where the centroids of the areas were converted to a point  
topology)
Drainages - vector, lines of drainages
DEM_16 - elevation at 16 foot resolution
Slope_16 - slope at 16 foot resolution (calculated from DEM)
Aspect_16 - aspect at 16 foot resolution (also calc. from DEM)

Once I have identified the closest drainage based on least-cost- 
distance, I want to upload two columns to the All_sites db, one for  
the distance, one for the drainage identified as closest - just like  
v.distance allows.

r.drain does some of what I want, but not completely. I have been  
staring at the manual pages and searching the archives for a while  
now, and it really seems that everyone has specified start/stop  
points in mind (all of the talk about Tobler's hiking function a few  
months back, for example).

Chances are that I am making this more complicated than necessary,  
but I hoped there could be some sort of solution. If specifying a  
destination is really the way I have to go, I can convert my drainage  
lines into points, and just find the shortest distance to one of  
those points via a cost surface. But again, I still don't know how to  
let GRASS decide which of 2 lines, points, etc. are closer (via a  
cost surface) and then have it give me that least-cost distance.

Any ideas?

Thanks much in advance,
Brandon
_______________________
Brandon M. Gabler
Doctoral Candidate
Department of Anthropology
University of Arizona
Tucson, AZ 85721
Phone: (520) 621-8455
Fax: (520) 621-2088
bgabler at email.arizona.edu

"Who? When? Whither? are the questions with which the archaeologist  
challenges the refuse heaps, scattered potsherds, and broken shafts,  
to tell of the builders who came and lived and went their way into  
the templed past." -- Edgar Lee Hewett, in Pajarito Plateau and its  
Ancient People, 1938


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20070408/9692214e/attachment.html


More information about the grass-user mailing list