Use an Arcade expression to gather data from separate features that exist within the area of a polygon feature?

241
1
02-29-2024 08:19 AM
hannahisreeding
New Contributor II

 

Would it be possible to use an Arcade expression gather data from separate features that exist within the area of a specific polygon feature?

 

OKAY to further elaborate: My polygon feature would be the Sheets. I need to get length sums and counts of the specific features that exist within the areas these polygons. My features are cables (which are in the same line feature, the CABLE_TYPE and LENGTHS are important attribute fields that I would need) and differing structure types (also in the same point field, the STRUCTURE_TYPE is an attribute field I would need to get a count of). In my attribute table for my Sheet polygons feature, I've got fields for the sheet numbers, fields that are named for each of the cable types, and fields that are named for each structure type. Under the cable type field, I would need to sum the lengths of the specific cable types that exist within the area of the Sheet polygons. For the structure type field, I would need a count of how many of those specific structures exist within the area of the Sheet polygons. 

 

For example, I have "BFO24W"  cable line features that exist in the areas of my Sheet polygons. The "BFO24W" cable is an attribute in my cable table. In my Sheet polygons attribute table, BFO24W is the name of a field. Within this BFO24W field, I would need to calculate the sum of the length for all BFO24W cables that exist in the areas of these separate Sheets. So, I'd need the calculate the length for cables under the area of Sheets 1, 2, 3, 4, 5, etc....

 

My first issue is trying to get data from the Cable attribute table into the attribute table for the Sheets. My second issue is attempting to get this data to populate for ALL of my Sheet polygons, which are attributed by sheet number. I would need to get the sum of the specific cable type lengths that exist within the area of the specific sheets. 

 

 

If($feature.Clabel == "BFO24W"){return $feature.ClengthFt}

Somehow I need to get this expression to go from the Cable Table and into the BFO24W field for my Sheets Table and also somehow get it to give a total length for the specific Sheet the cable type is within. But I need it to automatically recognize all of the sheets and give a sum for the lengths of the cables in each individual sheet. 

 

sorry there was a lot of repetitive stuff but this is so hard to explain 

 

 

Tags (1)
0 Kudos
1 Reply
ZachBodenner
MVP Regular Contributor

Have you tried playing around with the Intersects function? You could write an arcade code that checks to see which cables intersect the sheet polygon, then identify the cable type you're looking for as a variable and sum the length of those types of cables? Obviously, arcade expressions aren't going to write data into the sheets attribute table, but you'd get sheet-specific intersecting cable info. when you click on the sheet popup?

 

 

0 Kudos