ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Analytics

  • Home
  • Applied Analysis
  • Python

Cost-distance analysis workflow using ArcGIS Desktop - Lesson 4: Creating a corridor

    This lesson will cover how to create a corridor, the third cost-distance analysis workflow. In lessons 2 you covered the cost-distance analysis workflow for connecting regions with the optimum network and in lesson 3, you walked through the workflow for connecting two specified regions with the least-cost path. Like the least-cost path created in lesson 3, a corridor connects two regions, but unlike the least-cost path, the corridor is wider than one cell. As you will see, a corridor is not just a buffered least-cost path. These wider corridors are particularly useful for connecting your wildlife patches in your bobcat conservation plan.

    Creating a corridor is a four step process:

    1. Calculate the cost distance from region 1.
    2. Calculate the cost distance from region 2.
    3. Use the Corridor tool to combine the two cost distance surfaces calculated above.
    4. Set a accumulative-cost threshold to define the corridor.

    This lesson is divided into four sections:

    1. Opening and editing the ModelBuilder model
    2. Using the Cost Distance tool to calculate cost distance rasters
    3. Using the Corridor tool to add cost distance rasters
    4. Using the Extract by Attributes tool to delineate the final corridor

    ArcGIS Spatial Analyst extension is required for this analysis and you must ensure that it is enabled. See Enabling the Spatial Analyst extension.

    This lesson continues on the data that you downloaded in lesson 1. If you have not downloaded the data, see the first section in Lesson 1: Creating a cost surface.

    Opening and editing the ModelBuilder model

    1. Open the Corridor map document in the CostDistanceAnalysis folder by double-clicking the file.

      Navigating to the Corridor.mxd

    2. Three layers are visible on the map: Source, Destination, and CostSurface. Explore the CostSurface layer by clicking it with the Identify tool Identify (found on the Tools toolbar). A cost surface represents how costly, or taxing it is, to travel across each map unit. Notice that areas in red are more costly than areas in green.

      Source and Destinations layers displayed on the CostSurface layer

    3. To help keep the corridor workflow organized, the tools used will be tracked in a ModelBuilder model. Within the CostDistanceAnalysis folder is a folder named Toolboxes, with a toolbox named CostDistanceAnalysisToolbox.tbx, which contains several models. One of these models will be used to create a corridor for this lesson. Open ArcCatalog by clicking the ArcCatalog icon Catalog in the taskbar, which will open the Catalog window. From the Catalog window, open the Corridor model by right-clicking the model and clicking Edit.

      Opening the Corridor model

    Using the Cost Distance tool to calculate cost distance rasters

    A corridor connects two regions, represented in this lesson by the Source and Destination layers. In contrast to least-cost paths, which differentiate between the source and destination regions, the Corridor tool only requires two regions to be present. This lesson will use the Source and Destination layers as the two input regions to allow for comparison with the least-cost path created in lesson 3.

    1. Drag the Source and Destination layers from the table of contents into the Corridor model.

      Adding the Source and Destination layers to the ModelBuilder model

    2. Not only are two regions required, so is a cost surface. Corridors are calculated by measuring the accumulation of cost from traveling to and from the two regions, based on the values in the cost surface. Drag the CostSurface layer from the table of contents into the Corridor model, and place it between the Source and Destination layers.

      Adding the CostSurface layer to the ModelBuilder model

    3. To calculate accumulative cost from a region, use the Cost Distance tool. This tool requires the Spatial Analyst extension, so turn on the extension by first clicking the Customize tab in the ArcMap taskbar. Choose the Extensions option from the drop-down list, and check the Spatial Analyst check box to turn it on.

      Browsing to the Extensions dialog box

      Checking the Spatial Analyst extension

    4. Once the extension is turned on, access is granted to the Spatial Analyst tools. Open the ArcMap toolboxes by clicking the ArcToolbox button ArcToolbox in the Standard toolbar. Browse to the Cost Distance tool in the Distance toolset in the Spatial Analyst Tools toolbox.

      Browsing to the Cost Distance tool

    5. Drag the Cost Distance tool into the Corridor model and place it to the right of the Source and CostSurface layers.

      Adding the Cost Distance tool to the model

    6. Using the Connect tool Connect in the Corridor ModelBuilder model taskbar, connect the Source layer to the Cost Distance tool. Make the connection by clicking the Source layer first, and then click the Cost Distance tool. Choose the Input raster or feature source data option.

      Connecting Source to the Cost Distance tool and entering it as the Input raster or feature source data

    7. While the Connect tool is still turned on, connect the CostSurface layer to the Cost Distance tool. Select the Input cost raster option.

      Connecting CostSurface to the Cost Distance tool and entering it as the Input cost raster

    8. Double-click the Cost Distance tool to open the tool's dialog box. Type CostDistance_1 in the Output distance raster parameter to name the output distance raster. The model automatically saves the file into the Output.gdb geodatabase file. To summarize the input and output layers for the Cost Distance tool, specify the parameters as follows:
      • Input raster or feature source data: Source
      • Input cost raster: CostSurface
      • Output distance raster: CostDistance_1

      Cost Distance tool dialog box with input parameters specified

    9. Click OK to close the Cost Distance tool's dialog box.
    10. Once the dialog box is closed, right-click the Cost Distance tool and click Run to execute the tool.

      Running the Cost Distance tool within the model

    11. Add the CostDistance_1 output layer to the map document by right-clicking the green CostDistance_1 layer in the model and clicking Add To Display.

      Adding the output from Cost Distance to the display

    12. Explore the CostDistance_1 layer within the Corridor map document. According to the legend, locations that can be reached at low costs from the source are in lighter colors. In contrast, locations farther from the source are more costly to reach, which is indicated by darker colors.

      Source and Destination displayed over the cost distance from the Source

    13. At this point in the workflow, the accumulation of cost from the first region has been calculated. Recall that a corridor measures the accumulation of cost from both regions. The next step is to repeat the above procedure for the second region. Navigate again to the Cost Distance tool in the ArcToolbox.

      Browsing to the second Cost Distance tool

    14. Drag the Cost Distance tool into the Corridor model and place it to the right of the Destination and CostSurface layers.

      Adding the second Cost Distance tool for the Destination to the ModelBuilder model

    15. Organize the variables within the Corridor model by clicking the Select Elements tool Select Elements. Drag the Output backlink variable from the first Cost Distance tool above the CostDistance_1 layer. Then use the Select Elements tool to draw a rectangle around the second Cost Distance tool and its output variables. Once they are highlighted, reposition the second Cost Distance tool to the right of the CostSurface and Destination layers.

      Reorganizing the input data, tools, and output layers in the ModelBuilder model

    16. Using the Connect tool Connect in the Corridor model, connect the Destination layer to the second Cost Distance tool. Make the connection by clicking the Destination layer first, and then click the Cost Distance tool. Choose the Input raster or feature source data option.

      Connecting Destination to the second Cost Distance tool and entering it as the Input raster or feature source data

    17. Recall that the Cost Distance tool also requires a cost raster. Using the Connect tool in the Corridor model, connect the CostSurface layer to the second Cost Distance tool.

      Connecting CostSurface to the second Cost Distance tool and entering it as the Input cost raster

    18. Double-click on the second Cost Distance tool to open the tool's dialog box. Type CostDistance_2 in the Output distance raster parameter to name the output distance raster. To summarize the input and output layers for the second Cost Distance tool, specify the parameters as follows:
      • Input raster or feature source data: Destination
      • Input cost raster: CostSurface
      • Output distance raster: CostDistance_2

      Second Cost Distance tool dialog box with input parameters specified

    19. Click OK to close the Cost Distance tool's dialog box.
    20. Once the dialog box is closed, right-click the second Cost Distance tool and click Run to execute the tool.

      Running the second Cost Distance tool for the Destination

    21. Add the CostDistance_2 output layer to the map document by right-clicking the green CostDistance_2 layer in the model and clicking Add To Display.

      Adding the output from Cost Distance for Destination to the display

    22. Explore the CostDistance_2 layer within the Corridor map document. This layer looks very similar to the CostDistance_1 layer, except that the cost accumulates from the second region.

      Cost distance from Destination layer

    Using the Corridor tool to add cost distance rasters

    At this point in the workflow, the accumulated cost from both regions has been calculated. The next step for creating a corridor combines the CostDistance_1 and CostDistance_2 layers into a single layer using the Corridor tool.

    1. Browse to the Corridor tool in ArcToolbox by clicking the Spatial Analyst Tools toolbox and then the Distance toolset.

      Browsing to the Corridor tool

    2. Drag the Corridor tool into the Corridor model, and place it to the right of the CostDistance_1 and CostDistance_2 layers.

      Adding the Corridor tool to the ModelBuilder model

    3. Using the Connect tool Connect in the Corridor model, connect the CostDistance_1 layer to the Corridor tool. Make the connection by clicking the CostDistance_1 layer first, and then click the Corridor tool. Choose the Input cost distance raster 1 option.

      Connecting the cost distance from the Source to the Corridor tool and entering it as the Input cost distance raster 1

    4. Next, use the Connect tool to add the CostDistance_2 layer to the Corridor tool. Choose the Input cost distance raster 2 option.

      Connecting the cost distance from the Destination to the Corridor tool and entering it as the Input cost distance raster 2

    5. Double-click the Corridor tool within the Corridor model to open the tool's dialog box. Type Corridor in the Output raster parameter to name the resulting corridor raster. To summarize the input and output layers for the Corridor tool, specify the parameters as follows:
      • Input cost distance raster 1: CostDistance_1
      • Input cost distance raster 2: CostDistance_2
      • Output raster: Corridor

      Corridor tool dialog box with input parameters specified

    6. Click OK to close the dialog box and apply the changes you have made to the Corridor tool.
    7. Once the dialog box is closed, right-click the Corridor tool and click Run to execute the tool.

      Running the Corridor tool within the model

    8. Add the Corridor output layer to the map document by right-clicking the green Corridor layer in the model and clicking Add To Display.

      Adding the output from the Corridor to the display

    9. Explore the Corridor layer within the Corridor map document by clicking on various parts of the map with the Identify tool Identify (found in the Tools toolbar). Recall that a corridor measures the accumulative cost to travel between two regions. The Corridor tool is designed to add the cost distances from regions one and two together, thereby calculating the accumulative cost for back-and-forth travel.

      Source and Destination layers on top of the output from the Corridor tool

    Using the Extract by Attributes tool to delineate the final corridor

    In order to narrow the Corridor layer into something that resembles an actual corridor, a threshold has to be set for the maximum acceptable accumulative cost within the corridor. This can be done using the Extract by Attribute tool.

    1. Browse to the Extract by Attributes tool in ArcToolbox by clicking the Spatial Analyst Tools toolbox and then the Extraction toolset.

      Browsing to the Extract by Attribute tool

    2. Drag the Extract by Attributes tool into the Corridor model, and place it to the right of the Corridor output layer.

      Adding the Extract by Attribute tool to the ModelBuilder model

    3. Using the Connect tool Connect in the Corridor model, connect the Corridor output layer to the Extract by Attributes tool. Make the connection by clicking the Corridor layer first, and then click the Extract by Attributes tool. Choose the Input raster option.

      Connecting the output layer from Corridor to the Extract by Attributes tool and entering it as the Input raster

    4. Double-click the Extract by Attributes tool within the Corridor model to open the tool's dialog box. Locate the Where clause parameter. This is where the threshold for maximum acceptable accumulative cost within the corridor is specified. Inside the Where clause parameter, type the following statement: "Value" < 222,000. This threshold value is determined by the accumulative distance values, the mover's preference, and the study area. Type Corridor_Final in the Output raster parameter to name the resulting least-cost path. To summarize the input and output for the Extract by Attributes tool, specify the parameters as follows:
      • Input raster: Corridor
      • Where clause: "Value" < 222,000
      • Output raster: Corridor_Final

      Extract by Attribute tool dialog box with input parameters specified

    5. Click OK to close the dialog box and apply the changes made to the Extract by Attributes tool.
    6. Once the dialog box is closed, right-click the Extract by Attributes tool and click Run to execute the tool.

      Running the Corridor tool within the model

    7. Add the Corridor_Final output layer to the map document by right-clicking the green Corridor_Final layer in the model and clicking Add To Display.

      Adding the output from Corridor to the display

    8. Save the Corridor model by clicking the Save button Save in the ModelBuilder taskbar. Close the model once it is saved.

      Resulting corridor from Extract by Attribute displayed with Source and Destination over the corridor surface

    9. Turn off the Corridor, CostDistance_2, and CostDistance_1 layers by unchecking their respective check boxes in the table of contents.

      Resulting corridor from Extract by Attribute displayed with Source and Destination over the cost surface

    10. Zoom in on the corridor using the Zoom In tool Zoom In tool on the Tools toolbar. Click the Zoom In tool, drag a rectangle in the area between the Source and Destination regions. Since the Corridor_Final layer is displayed above the CostSurface layer, it is easier to see how the cost surface affects the corridor. Notice how the corridor thins as it traverses the high-cost section in red. Also notice that the corridor crosses the area of high cost at its thinnest point, reducing the total accumulative cost of the corridor.

      Zoomed to the resulting corridor from Extract by Attribute displayed with Source and Destination over the cost surface

    11. Explore the Corridor_Final layer by clicking on it with the Identify tool Identify (found on the Tools toolbar). There are no values greater than the maximum acceptable value specified in this lesson, 222,000. Additionally, the accumulative cost values decrease towards the center of the corridor (darker color). At the very center of the corridor is the single route with the lowest accumulative cost, which is the least-cost path.
    12. Save the map document by clicking the Save Save button on the Standard toolbar.

    At this point, the third cost-distance analysis workflow has been completed, a corridor has been created between two regions. This lesson also made note of the similarities and differences between corridors and least-cost paths from lesson 3. To learn more about least-cost paths, see Lesson 3: Creating a least cost path. To learn more about how a cost surface is created, see Lesson 1: Creating a cost surface.

    ArcGIS Desktop

    • Home
    • Documentation
    • Support

    ArcGIS

    • ArcGIS Online
    • ArcGIS Desktop
    • ArcGIS Enterprise
    • ArcGIS
    • ArcGIS Developer
    • ArcGIS Solutions
    • ArcGIS Marketplace

    About Esri

    • About Us
    • Careers
    • Esri Blog
    • User Conference
    • Developer Summit
    Esri
    Tell us what you think.
    Copyright © 2021 Esri. | Privacy | Legal