SummarizeUNErrors

Title  Summarize Utility Network Errors

Description

Generates a Mobile GDB summarizing utility network errors and data inconsistencies

Usage

          
For best performance, run this tool with a database connection.
The Utility Network must be at least Schema Version 4 to extract dirty areas.

The output geodatabase has a series of tables:
  • AssociationErrors:
    • Duplicate Associations - Associations that exist multiple times.
    • Dangling Association - Associations where the From and/or To side do not exist.
  • AssociationStatus - Network sources where the AssociationStatus field is out of sync.
  • DuplicateGlobalID - Network sources that share the same GlobalID.
  • Errors - Dirty Areas and Associations with errors that have been enriched with information from feature space.
  • SubnetworkErrors:
    • Duplicate Terminal - Subnetwork controllers sharing the same terminal.
    • Duplicate Subnetwork Name - Subnetwork controllers in different tiers with the same subnetwork name.
    • Controller in Multiple Tiers - Subnetwork controllers in different tiers on the same record.
  • Topology Inconsistencies:
    • Dirty Object with no source - Dirty areas/associations without matching source record
    • Element with no source - EID without matching source record
    • Source with no element - Validated source record without matching EID
  • View_Error_Summary - A count of errors by table and error code.
  • View_Errors_By_Type - A count of errors by table, error code, origin, and destination.

License

Standard

Syntax

SummarizeUNErrors (network, folder, {options})

Parameter Explanation Data Type
network Dialog Reference

The utility network

GPUtilityNetworkLayer
folder Dialog Reference

The folder where the results will be saved.

DEFolder
options (Optional) Dialog Reference

The options to check for in the utility network.

  • Extract Dirty Areas and Associations in Error - Enriches error features with asset group/type and origin/destination geometry.
  • Identify Records with Incorrect Association Status - Identifies records with AssociationStatus out of sync with association table.
  • Identify Association Inconsistencies - Identifies data issues in the association table.
  • Identify Subnetwork Inconsistencies - Identifies data issues in the subnetwork table.
  • Identify Duplicate GlobalIDs - Identifies records with the same GlobalID across the utility network.
  • Identify EID Mapping Inconsistencies - Identifies inconsistencies between the EIDMappings table, dirty areas, associations, and source tables.

GPString

Code Samples

SummarizeUNErrors example 1 (Python window)

Creates a summary report of all dirty areas and associations in the utility network.

import arcpy

arcpy.udms.SummarizeUNErrors("Naperville Network", "D:/data")

SummarizeUNErrors example 2 (stand-alone script)

Summarizes dirty areas and data inconsistencies in the utility network.

import pathlib

import arcpy

un = "D:/data/network.gdb/UtilityNetwork/Network"
folder = str(pathlib.Path(un).parents[2])
options = [
    "DIRTY_AREAS",
    "ASSOCIATION_STATUS",
    "ASSOCIATION_ERRORS",
    "SUBNETWORK_ERRORS",
    "DUPLICATE_GLOBALID",
    "EID_MAPPINGS",
]

result = arcpy.udms.SummarizeUNErrors(
    network=un,
    folder=folder,
    options=options,
)

# Each table summarizes different error conditions.
gdb = pathlib.Path(result[0])
for dirpath, dirnames, filenames in arcpy.da.Walk(str(gdb), datatype="FeatureClass"):
    for f in filenames:
        count = arcpy.GetCount_management(str(gdb / f))[0]
        print(f"{f.split('.')[-1]}\t{int(count):,}")