I've been using the fantastic new featureSet function in Arcade expressions but can't quite work out how, if it is possible, to determine the area of one polygon dataset in another.
As an example, I have vegetation polygons and I wish to determine how much vegetation is within various boundary polygons using Arcade and custom pop-ups.
Any suggestions? Many thanks!
Solved! Go to Solution.
In a future release we'll add support for calculating area for a feature set of features. In the meantime you can do the following:
var allVegetation = FeatureSetByName( ... );
var vegInBoundary = Intersects( allVegetation, $feature);
var totalArea = 0;
for (var veg in vegInBoundary){
totalArea += AreaGeodetic(veg, "square-meters");
}
return totalArea;
This workflow is basically covered in this blog post - ArcGIS blog - Create powerful popups in web apps with Arcade feature sets in web apps
In a future release we'll add support for calculating area for a feature set of features. In the meantime you can do the following:
var allVegetation = FeatureSetByName( ... );
var vegInBoundary = Intersects( allVegetation, $feature);
var totalArea = 0;
for (var veg in vegInBoundary){
totalArea += AreaGeodetic(veg, "square-meters");
}
return totalArea;
This workflow is basically covered in this blog post - ArcGIS blog - Create powerful popups in web apps with Arcade feature sets in web apps
Sorry, I think I messed up the expression, I edited it now to what I think you're looking for.
This is perfect and works so well! This opens a lot of doors!