Hi all,
I have two layers. The first layer, contains streets as a line feature and in it, I make the attribute rules to extend the dataset. In my second layer, called "Analysepunkte_ExportFeatures" and that contains points that lie on those lines from the first layer. Each of the points contains a measurement value, the road width. Now I want to intersect the layers, and to calculate the mean of these points for each line.
When I am trying to update my attribute table in a test field with the field calculator, I get the error:
ERROR 160912: Failed to evaluate Arcade expression.
If I run everything through without this one attribute rule, then everything works again.
Here is my script of the attribute rule:
var fsSM = FeatureSetByName($datastore, "Analysepunkte_ExportFeatures", ["FB_Breite"]);
var zust = Intersects(fsSM, $feature);
var cnt = Count(zust)
var expr = ''
If (cnt == 0)
{expr = '0'}
else {
expr = Mean(zust)
}
return expr
How can I solve this?
Thanks for your help! 🙂