Cost distance among points

457
7
11-09-2011 05:28 AM
RebeccaGray2
New Contributor
Hello,

I am trying to create a table with the cost distance among a set of points.  I would like the cost distance to account for elevation and proximity to particular features. However I am not interested in the distance from any given cell to a features, but rather a pairwise table of the cost distances among selected cells. I can't seem to find a way to do this using the the Spatial tools. I would be grateful for help in setting up the proper analysis.

Thank you
0 Kudos
7 Replies
DuncanHornby
MVP Frequent Contributor
Rebecca,

It may help others to help you if you draw what you are trying to ask and upload it. You start off talking about points then end up talking about selected cells, so what are you actually talking about?
0 Kudos
RebeccaGray2
New Contributor
Sorry for the confusion. I talked about points and cells because I've been trying both feature and raster-based approaches. Let me try to be more clear.

I have a set of 104 places in the US, with coordinates, from which a biological virus sample was obtained. We know how the virus moved across the US from evolutionary analyses. Now I want to compare this 'known' path of movement (which has direction and speed) to the 'possible' or 'probable' paths of movement based on factors like elevation.

In the past, I have done such an analysis by comparing a pairwise matrix with 104*103/2 entries of genetic distance vs. a pairwise matrix of geographic distance. Now, I would like to expand the geographic matrix to a cost matrix that accounts for different variables I would like to test.

Basically my question is, how to obtain such a pairwise matrix of cost distances? I have produced my cost surfaces in ArcGIS, which are raster files with cell sizes of 0.1. I transformed the original shape file that contained my 104 points to a raster file also with cell sizes of 0.1 (note that because some of the points fall in the same cell, I now have 68 rows in my Attribute table). What I would like is to know the cost of traveling from each of the 68 cells to the other 67, using different cost surfaces (one for elevation, one for distance to rivers,etc).

I am quite new to GIS and so any guidance would be greatly appreciated!
0 Kudos
RebeccaGray2
New Contributor
Further clarification:

The output I would like is:

1) a matrix containing the cost of traveling in a straight line between each set of locations, to compare with the straight geographic distance (later I will normalize these for direct comparison).

2) a matrix with the cost for the least cost path for each set of locations.

3) a map showing the least cost path among all pairs of locations.

Thoughts and suggestions for implementation and/or strategy are appreciated.
0 Kudos
DuncanHornby
MVP Frequent Contributor
Rebecca,

I'm not so familiar with the type of analysis you are talking (I don't do too much grid analysis). So this is my understanding.  You have a cost layer distance to river. You have point 1 and it is intersecting a cell that is 1 mile from a river, point 2 is on another cell that is 4 miles from a river. So the value you are interested is the difference between these 2 points, which is 3 and then you repeat this analysis for all combinations of points (your 68 points)?

If I have understood this correct then you could use the tool Extract Multi Values to Points. This would get all your cost values for each point in 1 hit. You could then use a feature selection iterator to loop through your data doing the pairwise difference (I'm assuming you are ArcGIS 10)? If you can program in Python it may be easier to do the looping in that?

Duncan
0 Kudos
RebeccaGray2
New Contributor
Hi Duncan,

Not quite. I've uploaded some picture to help illustrate what I need to do. In the file POINTS, all 104 points are shown. In the file LAKE, this is a reclassified surface that represents the distance to a lake on a scale of 1-10. Two example points are shown in red. I would like to find out the "cost" of getting from one point to the other if you traveled in a straight line between them, summing the value of each cell that you would pass through. Then, I would like to determine the 'least cost path' between these two points.

ELEVATION shows a different reclassified surface, for which I would like to do the same analysis. Then, I need to do this for every possible pair of points.

Please let me know if this makes sense. Help is greatly appreciated.
0 Kudos
DuncanHornby
MVP Frequent Contributor
Rebecca,

Well you could convert all combination of points into polylines using the Points To Line tool. If you are using model builder then you would probably have a master model with an feature iterator calling a sub-model which builds the polylines.  Again I think this would be easier as a python script.

Then you could create a model that loops for each line, rasterizes it using the polyline to raster tool (so only 1 polyline at a time) and use the zonal statistics tool to get the sum of the cells under your rasterized polyline.

Duncan
0 Kudos
RebeccaGray2
New Contributor
Hi Duncan,

OK, that sounds like a good approach. I've not used those tools before so I will look into them.

Thank you for your help!

Rebecca
0 Kudos