Select to view content in your preferred language

Attribute rule not working since the upgrade in ArcGIS Pro 3.5.1

238
2
06-24-2025 02:10 AM
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
2 Replies
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
KosThe
by
New Contributor

Thank you so much for your reply @GlenterpriceUK, I did update the attribute rule per your instructions, but it does not recognize the "Project" funtion. The Spatial reference is accepted, but when I add the project function I get the message bellow  

KosThe_0-1751018076639.png

 

0 Kudos