Make OD Cost Matrix Layer (Network Analyst)

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


Usage Tips

Syntax

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 Datatype
OInput analysis network (Required)

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

Network Dataset Layer
Output layer name (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 facilities for a given incident. The default can be overridden by the value of the <impedance_attribute> for the facility or incident. The minimum of the specified cutoffs for a given facility–incident pair is used to constrain the analysis.

Double
Default number of destinations to find (Optional)

Default number of closest facilities to find per incident. The default can be overridden by the value of the TargetFacilityCount property of the incidents.

Long
Accumulators (Optional)

List of cost attributes to be accumulated during analysis.

String
U-turn 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
Restrictions (Optional)

List of restriction attributes to be honored during analysis.

String
Use Hierarchy in analysis (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 rank settings (Optional)

Sets the hierarchy attribute values at which the navigation algorithm should form the highest, middle, and lowest ranks.

Network Analyst Hierarchy Settings
Output path shape (Optional)

Specifies the output shape type.

  • NO_SHAPE—No shape will be generated for the output route.
  • STRAIGHT_LINE—The output route shape will be straight lines from one stop to the next.

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_SHAPE

See Also

  • An overview of the network Analysis toolset
  • An overview of the Network Analyst toolbox