Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Network Analyst toolbox > Analysis toolset > Tools

Make OD Cost Matrix Layer (Network Analyst)

Release 9.3
Last modified December 23, 2008
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

Makes an origin-destination (od) cost matrix network analysis layer and sets its navigation properties.


Usage tips

Command line syntax
An overview of the Command Line window
MakeODCostMatrixLayer_na <in_network_dataset> <out_network_analysis_layer> <impedance_attribute> {default_cutoff} {default_number_destinations_to_find} {accumulate_attribute_name;accumulate_attribute_name...} {ALLOW_UTURNS | NO_UTURNS | ALLOW_DEAD_ENDS_ONLY} {restriction_attribute_name;restriction_attribute_name...} {NO_HIERARCHY | USE_HIERARCHY} {hierarchy_settings} {STRAIGHT_LINES | NO_LINES}

Parameter Explanation Data Type
<in_network_dataset>

The network dataset on which the OD cost matrix will be performed.

Network Dataset Layer
<out_network_analysis_layer>

Name of the OD cost matrix network analysis layer being created.

String
<impedance_attribute>

The cost attribute to be used as impedance in the analysis.

String
{default_cutoff}

Default impedance value at which to cut off searching for destinations for a given origin. If the accumulated impedance becomes higher than the cutoff value, the traversal stops. The default can be overridden by the value of the Cutoff_<impedance> property of the origins.

Double
{default_number_destinations_to_find}

Default number of destinations to find for each origin. The default can be overridden by the value of the TargetDestinationCount property of the origins.

Long
{accumulate_attribute_name;accumulate_attribute_name...}

List of cost attributes to be accumulated during analysis.

String
{ALLOW_UTURNS | NO_UTURNS | ALLOW_DEAD_ENDS_ONLY}

Specifies optional U-turn restrictions.

  • ALLOW_UTURNS — U-turns will be possible anywhere (default).
  • NO_UTURNS — No U-turns will be allowed during navigation.
  • ALLOW_DEAD_ENDS_ONLY — U-turns will be possible only at the dead ends (i.e., single-valent junctions).

String
{restriction_attribute_name;restriction_attribute_name...}

List of restriction attributes to be honored during analysis.

String
{NO_HIERARCHY | USE_HIERARCHY}

Specifies whether or not to use a hierarchy in the analysis.

  • USE_HIERARCHY — Will use the network dataset's hierarchy attribute in a heuristic path algorithm to speed analysis.
  • NO_HIERARCHY — Will use an exact path algorithm instead. If there is no hiearchy attribute, this option does not affect analysis.

Boolean
{hierarchy_settings}

Sets the hierarchy attribute values at which the navigation algorithm should form the highest, middle, and lowest ranks. The value is specified as a space-separated string containing two integers whose values must be greater than zero. The integers indicate low-to-mid and mid-to-high break values. The two integers must have their values in increasing order. For example, a value of "6 8" indicates that the primary roads are defined by the values of one to six, secondary roads by seven, and local roads by eight and higher.

Network Analyst Hierarchy Settings
{STRAIGHT_LINES | NO_LINES}

Specifies the type of line generated from the analysis.

  • NO_LINES — No shape will be generated for the output route. This is useful when you have large number of origins and destinations and are interested only in the OD cost matrix table (and not the output line shapes).
  • STRAIGHT_LINES — The output route shapes will be straight lines connecting each of the origin-destination pair.
In both cases, the properties for the route are the same. This means in both cases, only the shapes are different; the route cost computed is the same.

String
Data types for geoprocessing tool parameters


Command line example

MakeODCostMatrixLayer NewYorkNDS ODMatrix Minutes 30 3 Meters;Dollars ALLOW_DEAD_ENDS_ONLY Oneway;NoHazmat NO_HIERARCHY # NO_LINES

Scripting syntax
About getting started with writing geoprocessing scripts
MakeODCostMatrixLayer_na (in_network_dataset, out_network_analysis_layer, impedance_attribute, default_cutoff, default_number_destinations_to_find, accumulate_attribute_name, UTurn_policy, restriction_attribute_name, hierarchy, hierarchy_settings, output_path_shape)

Parameter Explanation Data Type
in_network_dataset (Required)

The network dataset on which the OD cost matrix will be performed.

Network Dataset Layer
out_network_analysis_layer (Required)

Name of the OD cost matrix network analysis layer being created.

String
impedance_attribute (Required)

The cost attribute to be used as impedance in the analysis.

String
default_cutoff (Optional)

Default impedance value at which to cut off searching for destinations for a given origin. If the accumulated impedance becomes higher than the cutoff value, the traversal stops. The default can be overridden by the value of the Cutoff_<impedance> property of the origins.

Double
default_number_destinations_to_find (Optional)

Default number of destinations to find for each origin. The default can be overridden by the value of the TargetDestinationCount property of the origins.

Long
accumulate_attribute_name (Optional)

List of cost attributes to be accumulated during analysis.

String
UTurn_policy (Optional)

Specifies optional U-turn restrictions.

  • ALLOW_UTURNS — U-turns will be possible anywhere (default).
  • NO_UTURNS — No U-turns will be allowed during navigation.
  • ALLOW_DEAD_ENDS_ONLY — U-turns will be possible only at the dead ends (i.e., single-valent junctions).

String
restriction_attribute_name (Optional)

List of restriction attributes to be honored during analysis.

String
hierarchy (Optional)

Specifies whether or not to use a hierarchy in the analysis.

  • USE_HIERARCHY — Will use the network dataset's hierarchy attribute in a heuristic path algorithm to speed analysis.
  • NO_HIERARCHY — Will use an exact path algorithm instead. If there is no hiearchy attribute, this option does not affect analysis.

Boolean
hierarchy_settings (Optional)

Sets the hierarchy attribute values at which the navigation algorithm should form the highest, middle, and lowest ranks. The value is specified as a space-separated string containing two integers whose values must be greater than zero. The integers indicate low-to-mid and mid-to-high break values. The two integers must have their values in increasing order. For example, a value of "6 8" indicates that the primary roads are defined by the values of one to six, secondary roads by seven, and local roads by eight and higher.

Network Analyst Hierarchy Settings
output_path_shape (Optional)

Specifies the type of line generated from the analysis.

  • NO_LINES — No shape will be generated for the output route. This is useful when you have large number of origins and destinations and are interested only in the OD cost matrix table (and not the output line shapes).
  • STRAIGHT_LINES — The output route shapes will be straight lines connecting each of the origin-destination pair.
In both cases, the properties for the route are the same. This means in both cases, only the shapes are different; the route cost computed is the same.

String

Data types for geoprocessing tool parameters


Script example

import arcgisscripting
gp = arcgisscripting.create()

gp.MakeODCostMatrixLayer(NewYorkNDS,"ODMatrix", "Minutes", 30, 3, "Meters;Dollars",  "ALLOW_DEAD_ENDS_ONLY", "Oneway;NoHazmat", "NO_HIERARCHY", "#", "NO_LINES")

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.