Hi Allison Goldberg
Just to provide you with another example, here is a way you can show more info. I used the FEMA layer as example, but since it has complex multipart polygons, it is pretty slow:
In this case it list the percentage of overlap of the different categories in the parcel. The expression used is:
var FEMA = OrderBy(Intersects($feature, FeatureSetByName($map,"FEMASupportData - Storm Surge 2016")), "CATEGORY DES");
var cnt = Count(FEMA);
var parcelarea = AreaGeodetic($feature, "square-feet");
var result = "FEMA:";
if (cnt > 0) {
for (var FEMApol in FEMA) {
var intersectarea = AreaGeodetic(Intersection($feature, FEMApol), "square-feet");
var category = FEMApol.CATEGORY;
var percentage = (intersectarea * 100.0) / parcelarea;
result += TextFormatting.NewLine + " - Category: " + category + " (" + Round(percentage, 2) + "%)";
}
} else {
result = "No risk detected";
}
return result;
There is a thing that is not working very well in this demo expression... when you have several polygons of the same FEMA category in one parcel you will have multiple lines. This can be avoided adjusting the expression. If you want to know how, just let me know and I can adjust the example.