Least Cost Path

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi in this exercise we're going to talk path algorithm and analysis we're going to do a sample problem here we're going to build a hiking trail in North West and Northwest Durham County and Orange County here you can see I have two vector GIS data layers the red octagon represents the stopping point that we're going to have the green square represents the starting point so what we're going to try to do is build a trail that goes from here all the way up to here and we have to think of a cost and what we're going to try to do is since we're building this hiking trail that's going to be family-friendly we want to go up the least amount of slope when I double-click on my cost path algorithm you're going to see what I have here I have some input parameters that I need one of the things that I need is a cost matrix and then another thing that it cost distance matrix and another thing that I need is a backlink so before I can even go through and calculate this analysis here I'm going to have to look at my cost path from my source to my destination which I already have represented I'm going to need a cost distance and I'm going to cost backlink raster here and before I even do that I need to calculate the slope here and you can see some of the input parameters that I have here I have my study area here and this is just going to I'm going to try to focus this and use this as my mask I have a DM that I'm going to use as to derive my slope right and typically my whole thinking is as I'm at a cell right here as I move further and further along I want to go to the next lowest slope so if we can try to envision that if I go from one cell to the next cell to the next cell as I go from my start to my destination I want to by essentially by as my cost the lowest amount of slope okay so as I travel from here to here I'm going to be going up the least amount of slope no matter what path I go I'm going to have the same change of elevation gain net change of elevation but as I do this I want to accumulate the least amount of slope okay so it's going to be the least possible slope so I can accommodate you know kids and older people or whatever okay in this example here so the first thing that I need to do is I'm going to go through and use my spatial analyst tools right here and calculate the slope here where are they here density extraction interpolation surface okay here they are and I'm going to calculate my slope and since I'm looking at just this study area right here my input raster is going to be my de M okay you can see my Z factor I have a big problem with my z factor and I'm going to make it a really tiny number point zero zero zero zero zero nine three because actually my units for my de M is going to be in degrees since I don't know this from the National map but and this is my conversion factor so I can just turn into something that works keep in mind when I calculate the degrees or whatever it's going to be and I turn this into a cost distance matrix or cost this and some raster we're going to have a it's going to be units multiplied by the resolution it's really not going to have some inherent value it's just going to look at this slope compared to other slopes that we're going to work with and then under environments under my raster analysis I'm going to make my Mac I'm asked to be my study area and when I'm set here I'm going to click OK I want to click OK here and go through and calculate this really quickly ok this is a pretty small study area here you can start to see my computer gets it's a little bit older here so I can calculate this so what we're going to get here is a slope map ok and the units we're going to disregard the unit's here but we're going to look at the areas that are high slope areas within my study area and then low slope areas that are within my study area I want to give this a minute or two to run and then we'll calculate the next thing because in order to compute the cost path I'm going to need to compute a cost distance now how much is that it is it going to cost for me to go from my starting point to whatever ending point I'm going to select and then a backlinks which tells me the direction that I'm going to go you know one of eight possible cardinal directions I'm going to go from one cell and when I move from that one cell to the next one which one has the least cost the lowest slope that I want to go to it should be done here and here's my slow clap right here and I'll get rid of this here remove all my junk here because as you start to look at this here let me remove my quad here okay because as we start to look at this here you can kind of see the direction that I'm going to want to go I'm just going to unclick here okay if I go up these if I go up this way here you can see the contour lines are really close together we which represents high slope if I go up kana towards this direction here you can see that it's less of a slope okay if I go across the lake right here well that's great because there's absolutely no slope is a slope associated with the lake but we can't do that and when we go through and set up our parameters later they and some future things we can kind of set this up set this area up to be no data we're not going to do that for now next thing I'm going to set up is my cost distance so my import on my source we're going to start at the starting point my cost is going to be this slope right here okay that we just went through and calculated so this slope map right here okay so that's going to be the cost that's what I'm going to be buying essentially and I want to buy as little slope as possible to get from my destination or my start to my destination I'll leave all the other parameters the same this is going to be my cost distance here okay from my starting point from this green point right here I'm going to see what this map looks like here as you look at this loop back you can see we don't really want to go of this area here we don't really want to go of this area right here because it's going to have the highest cost to get here okay even though we have to we want to get from here to here this is my cost matrix here and you can start to see what happens here we have a little bit we can go travel a little bit further based on that slope cost okay we look at this has a very low slope over here so we can get a little bit further in this direction as opposed to the other directions and this just tells us this cost allocation or it cost distance from the starting point and we haven't determined the anyone yeah the next thing we're to calculate is a backlink and this is just going to give me the direction okay the next cell on the least accumulative path to the nearest source so this is just going to give me the direction that I'm going to go so I can get from my source to my destination okay in this case we haven't determined the destination yet so as we travel along we're going to figure out the one that has the least cost the cell that has the least cost okay my starting cell is going to be my start my cost raster is going to be this slope once again click OK now this is called my backlink okay so you can see what my backlink looks like right here okay so I can see my yellow ones right here so in the yellow right here all this means is the one to the right has the least cost I could go if I'm in this cell right here I could go in one of eight directions okay if it's yellow it's telling they go to the right in order so I can accumulate as little cost as possible okay and that cost we determined to be sloped you can have this cost be anything if we're looking at mmm animal habitat we may call the force ones or twos and make a roadway to be a hundred it's going to want to travel in the force then the low cost values as opposed to going over the urban areas or roads we could have something associated with speed limits okay but keep in mind speed limits are going to be higher or higher speed limits will not associate with that so we want to look at the actual travel time along this tour if you convert maybe a section of road to a travel time that we associate it with and that cost we want to minimize that cost as much as possible so there's lots of different what we call impotence --is that we can associate with the it yourselves for me this cell is going to be something quantitative that I just extracted from a DM but it could be derived using a reclassify or whatever you want to do okay and when i zoom back out here all right - here and the last thing I need to do here is compute my cost path okay so my destination that is going to be my destination here I'll leave my destination feel the same okay my cost distance that's the one I went through and calculated before my backlink here's my backlink and here's my output and I'm going to go through and run this algorithm using these directions that will tell me the least cost distance to go from my start to my destination I'm going to check this and check this and I'll probably go through and check this here okay and you can see this is the trail that I'm going to build okay this is the path that with the trail that I'm going to build where I have the least amount of slope possible to go from my start to my destination I've run this before and it takes me over the lake so we have to set these to be no data or just set it to be a really ridiculously high cost and I can do this running a reclassify or some sort of raster calculation or using actually these these as masks or something like that but I didn't do so in this case here so you can see the path right here that I've run through that so this is a pretty easy easy algorithm very effective so we can calculate the least amount of cost to go from a starting point to a destination and we can do different permutations of this so we can look at circuits and different routes and things like this
Info
Channel: DEEGSNCCU
Views: 42,186
Rating: 4.9324894 out of 5
Keywords: NCCU, GIS, Least Cost Path, Least Cost Path Analysis, Raster GIS
Id: d0Eywj4pIu8
Channel Id: undefined
Length: 11min 42sec (702 seconds)
Published: Fri Feb 22 2013
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.