Can anyone help with an Arcade expression to calculate a new field in a point dataset based on whether or not each point feature is within a polygon dataset in ArcGIS Pro ModelBuilder?
I have a point dataset of CRM reports, and I want to indicate whether or not each point falls within the 1 in 100 year flood zone.
I am trying this in Calculate Field but it returns NULL values for each point. I also tried $datastore
instead of $map
but that didn't work either.
var point = Geometry($feature);
var polygon_layer = FeatureSetByName($map, 'flood');
var polygons = Intersects(polygon_layer, point);
if (Count(polygons) > 0) {
return "yes";
}
else {
return "no";
}