Select to view content in your preferred language

Attribute rule not working since the upgrade in ArcGIS Pro 3.5.1

93
1
yesterday
KosThe
by
New Contributor

attr.png

 

This attribute rule used to work just fine until now. It uses arcade to intersect two polygon layers and calculate the intersecting areas based on a category field. Here is the attribute rule: 

 

 

var buff = Buffer($feature,-0.001,'feet')
var intersectsLayer = Intersects(FeatureSetByName($datastore, "PER_NOTIOY_AIGAIOY"),buff)
var intcount = Count(intersectsLayer)
var expr = ' '
if(intcount == 0){
expr = 'εκτός αναρτησης'
}

else{
var das_list = ''
for (var f in intersectsLayer){
expr += f.KATHGORDX + " " + Round(area(Intersection($feature,f)),2) + " τ.μ. "
}
}

return

Tags (1)
0 Kudos
1 Reply
GlenterpriseUK
Esri Contributor

Hi @KosThe,

Have you tried modifying the Arcade to include the Spatial Reference?

Something around this lines like below:
var buff = Buffer($feature, -0.001, 'feet')
var intersectsLayer = Intersects(FeatureSetByName($datastore, "PER_NOTIOY_AIGAIOY"), buff)
var intcount = Count(intersectsLayer)
var expr = ' '

if (intcount == 0) {
    expr = 'εκτός αναρτησης'
} else {
    var das_list = ''
    var sr = SpatialReference(2100) // EGSA87 Greek Grid
    for (var f in intersectsLayer) {
        var geom1 = Project($feature, sr)
        var geom2 = Project(f, sr)
        expr += f.KATHGORDX + " " + Round(Area(Intersection(geom1, geom2)), 2) + " τ.μ. "
    }
}

return expr

0 Kudos