Optimal Region Connections (Raster Analysis)

Title  Optimal Region Connections (Raster Analysis)

Summary

Calculates the optimal connection of paths between two or more input regions


Illustration

Tool illustration Tool illustration

Usage


Syntax

Parameter Explanation
inputRegionsRasterOrFeatures

The input regions that are to be connected by the least-cost network.

Regions can be defined by either an image service or a feature service.

If the region input is a raster, the regions are defined by groups of contiguous (adjacent) cells of the same value. Each region must be uniquely numbered. The cells that are not part of any region must be NoData. The raster type must be integer, and the values can be either positive or negative.

If the region input is a feature, it can be polygons, lines, or points. Polygon feature regions cannot be composed of multipart polygons.

outputOptimumNetworkName

The name of the output optimum network feature service.

The polyline feature service of the optimum (least-cost) network of paths necessary to connect each of the input regions.

Each path (or line) is uniquely numbered, and additional fields in the attribute table store specific information about the path. Those fields include the following:

  • PATHID—Unique identifier for the path
  • PATHCOST—Total accumulative cost for the path
  • REGION1—The first region the path connects
  • REGION2—The other region the path connects

This information provides you insight into the paths within the network.

Since each path is represented by a unique line, there will be multiple lines in locations where paths travel the same route.

inputBarrierRasterOrFeatures (Optional)

Dataset that defines the barriers.

The barriers can be defined by an integer or floating point raster, or a feature layer.

inputAccumulationRaster

A raster defining the impedance or cost to move planimetrically through each cell.

The value at each cell location represents the cost-per-unit distance for moving through the cell. Each cell location value is multiplied by the cell resolution while also compensating for diagonal movement to obtain the total cost of passing through the cell.

The values of the cost raster can be integer or floating point, but they cannot be negative or zero (you cannot have a negative or zero cost).

outputNeighborNetworkName (Optional)

The name of the output Neighbor network feature service.

The polyline feature service identifying all paths from each region to each of its closest-cost neighbors.

Each path (or line) is uniquely numbered, and additional fields in the attribute table store specific information about the path. Those fields include the following:

  • PATHID—Unique identifier for the path
  • PATHCOST—Total accumulative cost for the path
  • REGION1—The first region the path connects
  • REGION2—The other region the path connects

This information provides you insight into the paths within the network and is particularly useful when deciding which paths should be removed if necessary.

Since each path is represented by a unique line, there will be multiple lines in locations where paths travel the same route.

Code Samples

Optimal Region Connections example 1 (Python window)

This example calculates the optimum connections between regions.


import arcpy

arcpy.OptimalRegionConnections_ra(
    "https://myserver/rest/services/regions/ImageServer", "outOptimalConnec",
    "https://myserver/rest/services/barriers/ImageServer",
    "https://myserver/rest/services/cost/ImageServer",
    "outNeighborNetwork")

                    

Optimal Region Connections example 2 (stand-alone script)

This example calculates the optimum connections between regions.


#-------------------------------------------------------------------------------
# Name: OptimalRegionConnections_Ex_02.py
# Description: Calculates the optimal connectivity network between two or more input regions.
# Requirements: ArcGIS Image Server

# Import system modules
import arcpy

# Set local variables
inputRegionsLayer =
    'https://MyPortal.esri.com/server/rest/services/Hosted/regions/ImageServer'
outputName = 'outOptimalConnectivity'
inputBarriersLayer =
    'https://MyPortal.esri.com/server/rest/services/Hosted/barriers/ImageServer'
inputCostLayer = 
    'https://MyPortal.esri.com/server/rest/services/Hosted/cost/ImageServer'
outputName02 = 'outNeighborNetwork'
distanceMethod = 'GEODESIC'

arcpy.OptimalRegionConnections_ra(inputRegionsLayer, outputName, inputBarriersLayer,
                                  inputCostLayer, outputName02, distanceMethod)
									

                    

Tags

Credits

Use limitations