Select to view content in your preferred language

automatically modify Association Containment

646
3
Jump to solution
11-18-2024 12:56 AM
abderhman97
Emerging Contributor

I'm working with a large electric utility network data set I'm aiming to create an attribute rule or Python script that will automatically update the containment relationship between features in my utility network. Specifically, I want to ensure that each 'ElectricDevice' and 'ElectricLine' feature is correctly associated with its containing 'StructureBoundary' feature based on their spatial relationship

0 Kudos
1 Solution

Accepted Solutions
RobertKrisher
Esri Regular Contributor

You should be able to find an example you can adapt in the attribute rule github repo: arcade-expressions/attribute-rules/attribute_rule_calculation at master · Esri/arcade-expressions · .... Something like the "Contain feature in a container within a search distance" would be a good place to start.

View solution in original post

0 Kudos
3 Replies
RobertKrisher
Esri Regular Contributor

You should be able to find an example you can adapt in the attribute rule github repo: arcade-expressions/attribute-rules/attribute_rule_calculation at master · Esri/arcade-expressions · .... Something like the "Contain feature in a container within a search distance" would be a good place to start.

0 Kudos
JohnGoat
Occasional Contributor

Hello @RobertKrisher
I can automatically establish containment relationships with arcade codes. However, I have a large amount of data (2 million features). I trigger the arcade codes during data append. This process takes approximately 72 hours, I want to do this from the Oracle database, is this possible?

0 Kudos
RobertKrisher
Esri Regular Contributor

If you're trying to create many associations at the same time you should either handle this during migration by populating the C_Associations table using a relationship or using the Create Association Records tool to establish associations based on spatial proximity. If you are beyond the asset package, you can write a Python script to generate a CSV file you can import using the Import Associations tool.

Arcade was designed to work with small collections of features at a time, it does not effectively scale to thousands of features at a time.

 

0 Kudos