Hi,
I have the following Arcade expression that works in the field calculator (AGOL, Pro). It combines a spatial join and a calculation.
Basically, enrich a polygon with a distinct list of values from the points
var bcit_portal = Portal("https://bcitgis.maps.arcgis.com/");
var structs = FeatureSetByPortalItem(bcit_portal,"dfb1df67022c4822a52dda331fa49da2", 0, ['park_structure_simple'],true)
var structs_in = Contains($feature, structs);
Console(count(structs_in));
var struct_list = [];
for(var feat in structs_in){
if(!Includes(struct_list, feat.park_structure_simple))
{
Push(struct_list, feat.park_structure_simple);
} // end of already in the list
}
return Concatenate(struct_list, ':')
It could be that I am a data-pipeline-noob but I cannot get exactly the same thing.
I can generate a lot of "stacked polygons" but not one polygon per park with a distinct list of values representing the structure types within that park.
Any guidance would be appreciated.
Rob