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
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?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.