Select to view content in your preferred language

Intersect Two FeatureSets

841
1
02-04-2023 10:24 AM
MeleKoneya
Frequent Contributor

I would like to be able to find the Features in one FeatureSet that Intersect the Features in another FeatureSet

 

var fs = FeatureSetByPortalItem(Portal('https://www.arcgis.com'), '2dfsafas62fbd15', 1, ['*'], true);
var i = FeatureSetByPortalItem(Portal('https://www.arcgis.com'), '5c81afa1a04d438a9316dada1', 1, ['*'], true);
var intersectLayer = Intersects(i,f);
return intersectLayer;

I am obviously missing something as the above doesn't work.

Let me know what I am doing wrong here.

Thanks,

 

Mele

 

Tags (1)
0 Kudos
1 Reply
MeleKoneya
Frequent Contributor

I think this will work for what I needed

 

// Samples: https://arcg.is/38SEWWz
var fs = FeatureSetByPortalItem(Portal('https://www.arcgis.com'), '22c15bddfadf42f262fbd15', 1, ['*'], true);
var i = FeatureSetByPortalItem(Portal('https://www.arcgis.com'), 'asdasdfafasdf', 0, ['*'], true);
for (var f in i)
{
var is = Intersects(f, fs);
}
return is;

0 Kudos