<?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 Why is my Arcade Intersects Expression not returning consistently correct results? in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/why-is-my-arcade-intersects-expression-not/m-p/1014747#M37932</link>
    <description>&lt;P&gt;I've written an Arcade Pop-Up expression that uses the Intersects function to return "Intersecting" or "Not Intersecting" based on whether a point feature intersects a polygon feature. I am getting varied results, with multiple cases of the Pop-Up returning "Not Intersecting" when the point is clearly intersecting a polygon feature. In my attached photo, the salmon colored area is a polygon, the white color is outside the bounds of the polygon.&lt;/P&gt;&lt;P&gt;Pop-up expression:&lt;/P&gt;&lt;P&gt;```&lt;BR /&gt;var geom1 = $feature;&lt;BR /&gt;var geom2 = FeatureSetByName($map,"Groundwater Plumes");&lt;BR /&gt;var intersectLayer = Intersects($feature, geom2);&lt;BR /&gt;var cnt = Count(intersectLayer)&lt;BR /&gt;var plume_int = " "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if (cnt &amp;gt;= 1) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; for (var f in intersectLayer){&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; plume_int = "Intersecting"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;} else {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; plume_int = "Not Intersecting"&lt;BR /&gt;}&lt;BR /&gt;return plume_int;&lt;BR /&gt;```&lt;BR /&gt;[![example of intersect error][1]][1]&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[1]: &lt;A href="https://i.stack.imgur.com/UxTvR.png" target="_blank" rel="noopener"&gt;https://i.stack.imgur.com/UxTvR.png&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jan 2021 18:45:18 GMT</pubDate>
    <dc:creator>AlaskaDepartment</dc:creator>
    <dc:date>2021-01-07T18:45:18Z</dc:date>
    <item>
      <title>Why is my Arcade Intersects Expression not returning consistently correct results?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/why-is-my-arcade-intersects-expression-not/m-p/1014747#M37932</link>
      <description>&lt;P&gt;I've written an Arcade Pop-Up expression that uses the Intersects function to return "Intersecting" or "Not Intersecting" based on whether a point feature intersects a polygon feature. I am getting varied results, with multiple cases of the Pop-Up returning "Not Intersecting" when the point is clearly intersecting a polygon feature. In my attached photo, the salmon colored area is a polygon, the white color is outside the bounds of the polygon.&lt;/P&gt;&lt;P&gt;Pop-up expression:&lt;/P&gt;&lt;P&gt;```&lt;BR /&gt;var geom1 = $feature;&lt;BR /&gt;var geom2 = FeatureSetByName($map,"Groundwater Plumes");&lt;BR /&gt;var intersectLayer = Intersects($feature, geom2);&lt;BR /&gt;var cnt = Count(intersectLayer)&lt;BR /&gt;var plume_int = " "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if (cnt &amp;gt;= 1) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; for (var f in intersectLayer){&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; plume_int = "Intersecting"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;} else {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; plume_int = "Not Intersecting"&lt;BR /&gt;}&lt;BR /&gt;return plume_int;&lt;BR /&gt;```&lt;BR /&gt;[![example of intersect error][1]][1]&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[1]: &lt;A href="https://i.stack.imgur.com/UxTvR.png" target="_blank" rel="noopener"&gt;https://i.stack.imgur.com/UxTvR.png&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 18:45:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/why-is-my-arcade-intersects-expression-not/m-p/1014747#M37932</guid>
      <dc:creator>AlaskaDepartment</dc:creator>
      <dc:date>2021-01-07T18:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my Arcade Intersects Expression not returning consistently correct results?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/why-is-my-arcade-intersects-expression-not/m-p/1015336#M37955</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/408164"&gt;@AlaskaDepartment&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the problem is in the intersects function. You need to specify the plumes featureset as first parameter and the current feature as second parameter. Try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var poi = $feature;
var plumes = FeatureSetByName($map, "Groundwater Plumes");
var intersectLayer = Intersects(plumes, poi);

var cnt = Count(intersectLayer);
var plume_int = "";
if (cnt &amp;gt;= 1) {
    plume_int = "Intersecting";
} else {
    plume_int = "Not Intersecting";
}

return plume_int;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2021 20:52:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/why-is-my-arcade-intersects-expression-not/m-p/1015336#M37955</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-01-09T20:52:17Z</dc:date>
    </item>
  </channel>
</rss>

