BuildStartingPoints

Title  Build Starting Points

Description

Creates starting points based on a trace configuration.

Usage

          
The Utility Network must be at least Schema Version 5.

License

Standard

Syntax

BuildStartingPoints (in_utility_network, trace_config, starting_class, group_by_field, {expression}, {results_trace_config}, {trace_result_type}, {trace_results_output}, {trace_results_input}, {filter_classes}, {skip_found}, {compare_output_name}, {remove_dup_groups})

Parameter Explanation Data Type
in_utility_network Dialog Reference

The utility network that will be used to trace.

GPUtilityNetworkLayer
trace_config Dialog Reference

The utility network trace configuration used to define the trace parameters.

GPString
starting_class Dialog Reference

The utility network starting points layer. A UN controlled layer can also be used, the center point of the line/polygon will be used as the starting point. For devices, a default terminal of 1 is used.

GPComposite
group_by_field Dialog Reference

A field with a value to group the result locations for the batch trace. Select ObjectID or Global ID to make each set of results unique.

Field
expression (Optional) Dialog Reference

The simple calculation expression used to limit the starting points used in a trace.

GPSQLExpression
results_trace_config (Optional) Dialog Reference

The trace configuration to use in the result. If not provided, the trace configuration used to find the results will be used.

GPString
trace_result_type (Optional) Dialog Reference

Determine how the results are stored.

GPBoolean
trace_results_output (Optional) Dialog Reference

The results from the trace in the starting points featureclass format.

DEFeatureClass
trace_results_input (Optional) Dialog Reference

The results from the trace in the Utility Network Starting Points featureclass format. If the row with the Global ID/Terminal ID exists, the ISDIRTY field will be updated. If the row does not exist, it will be inserted.

GPFeatureLayer
filter_classes (Optional) Dialog Reference

Only store features in these classes. This is useful when tracing a line layer to build starting points. The tool loops over all input features and creates a starting point to trace. If the trace results the features used to trace, they can be skipped to increase performance. This filter allows you to return them and not store them in the result.

GPString
skip_found (Optional) Dialog Reference

If a feature's global id was returned in a trace, do not trace that feature.

GPBoolean
compare_output_name (Optional) Dialog Reference

On an update, compare the group by names. When running a batch process, it is best to pick this, but may insert more records instead of updating.

GPBoolean
remove_dup_groups (Optional) Dialog Reference

Option to remove duplicate sets of results if they were discovered in a previous trace.

GPBoolean

Code Samples

BuildStartingPoints example 1 (Python window)

Iterate over the features in the starting class and trace to get an output starting locations table

import arcpy

in_utility_network = "D:/data/UtilityNetwork.gdb/UtilityNetwork/Network"
trace_config = "Trace Config:: Find Start Points"
starting_class = "D:/data/TraceLocations.gdb/Starting_Points"
group_by_field = "GLOBALID"
expression = None
results_trace_config = "Find Results"
trace_result_type = False
trace_results_output = "D:/data/TraceLocations.gdb/OutLocations"
trace_results_input = None
filter_classes = ["UNLine", "UNEdgeObject"]
skip_found = False
compare_output_name = True
out_utility_network = None
remove_dup_groups = True

arcpy.udms.BuildStartingPoints(
    "D:/data/UtilityNetwork.gdb/UtilityNetwork/Network",
    "Trace Config:: Find Start Points",
    "D:/data/TraceLocations.gdb/Starting_Points",
    "GLOBALID",
    None,
    "Find Results",
    False,
    "D:/data/TraceLocations.gdb/OutLocations",
    None,
    ["UNLine", "UNEdgeObject"],
    False,
    True,
    None,
    True,
)

BuildStartingPoints example 2 (stand-alone script)

Iterate over the features in the starting class and trace to get an output starting locations table

import arcpy

in_utility_network = "D:/data/UtilityNetwork.gdb/UtilityNetwork/Network"
trace_config = "Trace Config:: Find Start Points"
starting_class = "D:/data/TraceLocations.gdb/Starting_Points"
group_by_field = "GLOBALID"
expression = None
results_trace_config = "Find Results"
trace_result_type = False
trace_results_output = "D:/data/TraceLocations.gdb/OutLocations"
trace_results_input = None
filter_classes = ["UNLine", "UNEdgeObject"]
skip_found = False
compare_output_name = True
out_utility_network = None
remove_dup_groups = True

arcpy.udms.BuildStartingPoints(
    in_utility_network=in_utility_network,
    trace_config=trace_config,
    starting_class=starting_class,
    group_by_field=group_by_field,
    expression=expression,
    results_trace_config=results_trace_config,
    trace_result_type=trace_result_type,
    trace_results_output=trace_results_output,
    trace_results_input=trace_results_input,
    filter_classes=filter_classes,
    skip_found=skip_found,
    compare_output_name=compare_output_name,
    out_utility_network=out_utility_network,
    remove_dup_groups=remove_dup_groups,
)