Select to view content in your preferred language

Pulling multiple attributes from varying quantity of intersecting features

221
0
03-06-2026 03:11 PM
Labels (1)
SamSlater
New Contributor

I am attempting to fill a text field in a "Habitats" polygon with information from the SSURGO USA Soils Map Units feature layer. The specific attributes I am after are "Taxonomic Name" and "Taxonomic Class". The Habitats polygon intersects multiple Soil Unit features, and I would like the info for each.

I am also trying to order the displayed information by the proportion of the Habitats polygon that the each intersecting Soils Unit takes up. I've found previous posts but they have not fit my situation. 

How do I pull attribute information from varying quantities of intersecting layers? 

How do I order + label that information by intersecting area?

My code returns "Test execution error: Execution error - Invalid parameter. Verify test data."

// SSURGO Soil Map Unit

var p = 'https://xxxyyyzzz.maps.arcgis.com'

var id = '06e5fd61bdb6453fb16534c676e1c9b9'

var Units = FeatureSetByPortalItem(Portal(p), id, 0, ['taxorder', 'taxclname'], false)

//Habitats layer

var Habitats = FeatureSetByName($map, "Habitats")

// Find intersecting Soil Units

var Clipped_Units = Clip(Units, Habitats)

//Format Clipped Units with Taxonomic Class (taxclname) and Taxonmic Order (taxorder)

var Soil_Info;

for (var s in Clipped_Units){

    var Info = "Taxonomic Order: " + 'taxorder' + ", " +

                "Taxonomic Class Name: " + 'taxclname';

    Push(Soil_Info, Info)

}

return Soil_Info
0 Kudos
0 Replies