Origin Destination (OD) Matrix

Running programmatically

Calculates the cost along a Bidirectional Network (BDN) from each Origin to each Destination. The result can be stored as straight lines or polylines representing the shortest/quickest path between the origins and destinations

Inputs:

Outputs:

Notes :

Example:

Results from the OD Matrix function - Network created with no cost field - length of the street segments used as cost. Although straight lines are used as an output, the cost/distance values populated in the attribute table are the values calculated along the network.

Results from the OD Matrix function

Running Programmatically

(Go to TOP)

Parameters

Expression Explanation
Function Name ODMatrix
<Network to Use> A String - the full name of the Network file (.etn).
<Input Origin Points> A String representing the Input Origin Points layer.
<Input Destination Points> A String representing the input destinations layer.
<output dataset> A String - the full name of the output layer.
<snap tolerance> A Double representing the snap tolerance(in the units of the spatial reference of the Network).
{Input Barrier Points} A String representing the input layer with barrier points. Must be of Point type.
{Barriers Direction Field} A String representing the name of the field in the Input Barrier Points that will indicate the direction in which the barrier defined by each point work . Must be of String type.
{Straight Lines Output} A Boolean indicating whether the output to be represented by straight lines. Default = FALSE
{CutOff Cost} A Double representing the CutOff cost

Running the function

ETGWPath used in the table below is the  full path to ETGWRun.exe (E.G. "C:\Program Files\ETSpatial Techniques\ETGeo Wizards\ETGWRun.exe")

Language Syntax
Python subprocess.call([ETGWPath, "ODMatrix", "Network to Use", "Input Origin Points","Input Destination Points", "output dataset","snap tolerance", "Input Barrier Points", "Barriers Direction Field", "Straight Lines Output" "CutOff Cost"])
.NET using ETGWRun.exe StartInfo.FileName = ETGWPath
StartInfo.Arguments = "ODMatrix" "Network to Use" "Input Origin Points" "Input Destination Points" "output dataset" "snap tolerance" "Input Barrier Points" "Barriers Direction Field" "Straight Lines Output" "CutOff Cost"
.NET using ETGWOutX.dll ODMatrix(Network to Use,Input Origin Points,Input Destination Points, output dataset, snap tolerance, Input Barrier Points, Barriers Direction Field, Straight Lines Output,CutOff Cost)
ArcPy arcpy.ODMatrix(Network to Use,Input Origin Points,Input Destination Points, output dataset, snap tolerance, Input Barrier Points, Barriers Direction Field, Straight Lines Output, CutOff Cost)
,

Notes:

(Go to TOP)