Select to view content in your preferred language

Summarize 2 layer attributes withing selected geometry

244
0
03-15-2024 02:48 PM
Labels (2)
CassNEGIS
New Contributor III

My project has 3 relevant layers, 2 with data I wish to extract and a 3rd representing the geography I need a summary of. Landuse, Field "Use" (values x y z), Soils, Field "Soil Type" (values 1 2 3), and Parcels. The information I am looking for is the total area for every unique combination of Use and Soil Type that overlap spatially. The goal is for the user to click on any given parcel and get a table that looks something like:

CassNEGIS_0-1710538808076.png

var intersectLayer = Intersects(FeatureSetByName($map, "Landuse"),Buffer($feature, -10, 'feet'))
var landUse = ""
for (var f in intersectLayer){
    landUse = concatenate(landUse,f.Use_," ")
}
return landUse

Using the code above, I am able to get a list of landuses within the parcel and I've expanded it to do the same with the soil keys, but I don't know how to compare those geometries and calculate the amount of overlap.

My current workaround is to do this offline by running overlay:intersect of the soils and use layers, then doing the same with the result and the parcel layer, then uploading the result and using the Screening Widget to summarize the results, but the resulting layer has 200,000+ features and takes 20+ minutes to process and doesn't feel like the best or most efficient way of doing this. 

Tags (3)
0 Replies