<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Intersection arcade code doesn’t work in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/intersection-arcade-code-doesn-t-work/m-p/1482089#M59479</link>
    <description>&lt;P&gt;I don't see anything obviously wrong with the expression. I would suggest adding some &lt;STRONG&gt;Console&lt;/STRONG&gt; statements to the expression just to check the output of it.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;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)&lt;/LI-CODE&gt;&lt;P&gt;The Area function can depend on the layer's coordinate system, too. Try AreaGeodetic(interarea), does that give you anything different?&lt;/P&gt;</description>
    <pubDate>Fri, 31 May 2024 15:00:21 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2024-05-31T15:00:21Z</dc:date>
    <item>
      <title>Intersection arcade code doesn’t work</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intersection-arcade-code-doesn-t-work/m-p/1481872#M59468</link>
      <description>&lt;P&gt;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&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMG_3744.jpeg" style="width: 4032px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105877i7B710C4A7383DD6B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="IMG_3744.jpeg" alt="IMG_3744.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2024 08:02:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intersection-arcade-code-doesn-t-work/m-p/1481872#M59468</guid>
      <dc:creator>TyaRambault</dc:creator>
      <dc:date>2024-05-31T08:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection arcade code doesn’t work</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intersection-arcade-code-doesn-t-work/m-p/1482089#M59479</link>
      <description>&lt;P&gt;I don't see anything obviously wrong with the expression. I would suggest adding some &lt;STRONG&gt;Console&lt;/STRONG&gt; statements to the expression just to check the output of it.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;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)&lt;/LI-CODE&gt;&lt;P&gt;The Area function can depend on the layer's coordinate system, too. Try AreaGeodetic(interarea), does that give you anything different?&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2024 15:00:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intersection-arcade-code-doesn-t-work/m-p/1482089#M59479</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2024-05-31T15:00:21Z</dc:date>
    </item>
  </channel>
</rss>

