{"id":112,"date":"2010-11-05T16:55:11","date_gmt":"2010-11-05T20:55:11","guid":{"rendered":"http:\/\/web.colby.edu\/mgimond\/?p=112"},"modified":"2010-11-05T16:57:15","modified_gmt":"2010-11-05T20:57:15","slug":"cost-distance-knight-tool","status":"publish","type":"post","link":"https:\/\/web.colby.edu\/mgimond\/2010\/11\/05\/cost-distance-knight-tool\/","title":{"rendered":"Cost Distance (Knight) Tool"},"content":{"rendered":"<p><strong>Download<\/strong> the\u00a0<a href=\"https:\/\/wiki.colby.edu\/download\/attachments\/109806216\/CostDist_K.zip?version=1&amp;modificationDate=1260901823363\">32-bit XP version of the Cost Distance toolbox<\/a> or the\u00a0<a href=\"https:\/\/wiki.colby.edu\/download\/attachments\/109806216\/CostDist_K_64bit.zip?version=1&amp;modificationDate=1260911531663\">64-bit Windows 7 version<\/a> .<\/p>\n<blockquote><p>Currently, the tool will only work with a limited raster size.   Generally, the tool will work with rasters having the number of non-null   cells less than 50,000,000. The scripts are written in Python 2.5 but   the underlying &#8220;engine&#8221; is written in Python. There are two compiled   versions: 32-bit XP and 64-bit Win7. If you need to run the tools on a   different platform you can compile the *.f90 codes using a compiler such   as the opensource <a rel=\"nofollow\" href=\"http:\/\/gcc.gnu.org\/wiki\/GFortran\">gfortran<\/a>.<\/p><\/blockquote>\n<p>This customized toolbox contains two tools (scripts):<\/p>\n<ul>\n<li>Cost Distance (rook, bishop, and knight)<\/li>\n<li>Shortest Path<\/li>\n<\/ul>\n<p>The <span style=\"color: #993366\"><strong>Cost Distance<\/strong><\/span> tool computes  the accumulative cost distance from a point source to all cells defined  by a cost raster layer. This tool will only accept a single point as  source.<br \/>\nIn addition to an accumulative cost distance raster, the tool generates a  backlink raster that can be used by the Shortest Path tool.<\/p>\n<p><a href=\"http:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/input_output.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-114\" src=\"http:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/input_output-300x113.jpg\" alt=\"\" width=\"300\" height=\"113\" srcset=\"https:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/input_output-300x113.jpg 300w, https:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/input_output.jpg 845w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The <span style=\"color: #993366\"><strong>Shortest Path<\/strong><\/span> tool generates a  shortest distance polyline between a destination and point source. It  requires the use of the backlink raster created by the Cost Distance  tool locate in the same toolbox. NOTE: this backlink raster cannot be  used with ArcGIS Distance tools because of incompatible data structure.  Likewise, a backlink raster created from ArcGIS\u2019s Distance tools cannot  be used with this customized tool.<\/p>\n<p><a href=\"http:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/shortest_path.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-115\" src=\"http:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/shortest_path-300x105.jpg\" alt=\"\" width=\"300\" height=\"105\" srcset=\"https:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/shortest_path-300x105.jpg 300w, https:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/shortest_path-1024x360.jpg 1024w, https:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/shortest_path.jpg 1173w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>This cost distance tool differs from ArcGIS\u2019 Spatial Analyst Cost  Distance tool in that 16 search directions are used instead of 8.  Whereas ArcGIS uses a \u201crook\u201d and \u201cbishop\u201d search pattern, this tool uses  a \u201crook\u201d, \u201cbishop\u201d and \u201cknight\u201d search pattern. The additional search  directions increases the accuracy of the resulting accumulative cost  distance&#8212;albeit at a greater computational cost.<\/p>\n<p>In the following figure, a uniform cost raster (i.e. one whose cells  have equal costs) is used to create two accumulative cost distance  rasters&#8212;one using ArcGIS\u2019 Cost Distance tool, the other using the  customized \u201cKnight\u201d cost distance script. The resulting accumulative  cost distance raster show a pentagon pattern (ArcGIS\u2019 8 direction  search) and hexadecagon pattern (this tool).<\/p>\n<p><a href=\"http:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/CostDist_8_vs_16.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-116\" src=\"http:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/CostDist_8_vs_16-300x237.jpg\" alt=\"\" width=\"300\" height=\"237\" srcset=\"https:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/CostDist_8_vs_16-300x237.jpg 300w, https:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/CostDist_8_vs_16-1024x809.jpg 1024w, https:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/CostDist_8_vs_16.jpg 1065w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/coast_example.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-117 alignleft\" src=\"http:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/coast_example-172x300.jpg\" alt=\"\" width=\"172\" height=\"300\" srcset=\"https:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/coast_example-172x300.jpg 172w, https:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/coast_example.jpg 466w\" sizes=\"(max-width: 172px) 100vw, 172px\" \/><\/a><span style=\"color: #333399\"><strong> <\/strong><\/span><\/p>\n<p><span style=\"color: #333399\"><strong>Case study<\/strong><\/span><\/p>\n<p><span style=\"color: #333399\">The difference in  accuracy between and 8 and 16 direction search pattern is depended on  the underlying cost raster layer. For example, when identifying the  waterway area covered within a 20 km traveling distance from the source  (i.e. if you could travel only 80 km from a point, what waterway area  could you cover) using both Cost Distance tools, the 8 direction search  path (blue) underestimates the area covered by 27% compared to the 16  direction Costa Distance tool.<\/span><br \/>\n<span style=\"color: #333399\">You can download the source dataset <strong><a href=\"http:\/\/web.colby.edu\/mgimond\/files\/2010\/11\/coastal_example.zip\">here<\/a><\/strong>.<\/span><\/p>\n<p><!--more--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Download the\u00a032-bit XP version of the Cost Distance toolbox or the\u00a064-bit Windows 7 version . Currently, the tool will only work with a limited raster size. Generally, the tool will work with rasters having the number of non-null cells less than 50,000,000. The scripts are written in Python 2.5 but the underlying &#8220;engine&#8221; is written [&hellip;]<\/p>\n","protected":false},"author":1199,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[12809],"tags":[],"_links":{"self":[{"href":"https:\/\/web.colby.edu\/mgimond\/wp-json\/wp\/v2\/posts\/112"}],"collection":[{"href":"https:\/\/web.colby.edu\/mgimond\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/web.colby.edu\/mgimond\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/web.colby.edu\/mgimond\/wp-json\/wp\/v2\/users\/1199"}],"replies":[{"embeddable":true,"href":"https:\/\/web.colby.edu\/mgimond\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":4,"href":"https:\/\/web.colby.edu\/mgimond\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"predecessor-version":[{"id":120,"href":"https:\/\/web.colby.edu\/mgimond\/wp-json\/wp\/v2\/posts\/112\/revisions\/120"}],"wp:attachment":[{"href":"https:\/\/web.colby.edu\/mgimond\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/web.colby.edu\/mgimond\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/web.colby.edu\/mgimond\/wp-json\/wp\/v2\/tags?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}