Select to view content in your preferred language

Intersection arcade code doesn’t work

224
1
05-31-2024 01:02 AM
Labels (1)
TyaRambault
New Contributor

I tried to calculate the area that intersect my plot layer but every time it return 0, please help me understand what’s wrong with my script 

IMG_3744.jpeg

0 Kudos
1 Reply
jcarlson
MVP Esteemed Contributor

I don't see anything obviously wrong with the expression. I would suggest adding some Console statements to the expression just to check the output of it.

var znieff1 = FeatureSetByName($datastore, 'ZNIEFF Type 1')
Console(Count(znieff1))

var xs = Intersects(znieff1, $feature)
Console(Count(xs), 'features in intersection')

var interznieff = First()
Console('area of feature:', Area(interznieff))

var interarea = Intersection(interznieff, $feature)
return Area(interarea)

The Area function can depend on the layer's coordinate system, too. Try AreaGeodetic(interarea), does that give you anything different?

- Josh Carlson
Kendall County GIS
0 Kudos