<?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 Arcade Question in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-question/m-p/1634950#M65658</link>
    <description>&lt;P&gt;I am working on an Arcade script that will use a parcel layer to intersect with a zoning layer and return the zoning that intersects with the parcel.&amp;nbsp; I have successfully gotten the two layers to intersect and return the zoning, the issue is that the data is not clean, so I need to return the value that intersects with the center of the parcel.&amp;nbsp; My code looks like this:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;other_layer&lt;/SPAN&gt;&lt;SPAN&gt; = (&lt;/SPAN&gt;&lt;SPAN&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$map&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Zoning Layer"&lt;/SPAN&gt;&lt;SPAN&gt;, [&lt;/SPAN&gt;&lt;SPAN&gt;"Zoning"&lt;/SPAN&gt;&lt;SPAN&gt;]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;firstfeature&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;First&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Intersects&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$Feature&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;other_layer&lt;/SPAN&gt;&lt;SPAN&gt;));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;firstfeature&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;"Zoning"&lt;/SPAN&gt;&lt;SPAN&gt;];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Can anyone help me alter this to get the intersection of the center.&amp;nbsp; Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 22 Jul 2025 13:44:13 GMT</pubDate>
    <dc:creator>GaryMorris</dc:creator>
    <dc:date>2025-07-22T13:44:13Z</dc:date>
    <item>
      <title>Arcade Question</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-question/m-p/1634950#M65658</link>
      <description>&lt;P&gt;I am working on an Arcade script that will use a parcel layer to intersect with a zoning layer and return the zoning that intersects with the parcel.&amp;nbsp; I have successfully gotten the two layers to intersect and return the zoning, the issue is that the data is not clean, so I need to return the value that intersects with the center of the parcel.&amp;nbsp; My code looks like this:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;other_layer&lt;/SPAN&gt;&lt;SPAN&gt; = (&lt;/SPAN&gt;&lt;SPAN&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$map&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Zoning Layer"&lt;/SPAN&gt;&lt;SPAN&gt;, [&lt;/SPAN&gt;&lt;SPAN&gt;"Zoning"&lt;/SPAN&gt;&lt;SPAN&gt;]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;firstfeature&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;First&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Intersects&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$Feature&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;other_layer&lt;/SPAN&gt;&lt;SPAN&gt;));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;firstfeature&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;"Zoning"&lt;/SPAN&gt;&lt;SPAN&gt;];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Can anyone help me alter this to get the intersection of the center.&amp;nbsp; Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 22 Jul 2025 13:44:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-question/m-p/1634950#M65658</guid>
      <dc:creator>GaryMorris</dc:creator>
      <dc:date>2025-07-22T13:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Question</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-question/m-p/1634952#M65659</link>
      <description>&lt;P&gt;Simple enough. I am guessing that the parcel intersects multiple zoning layers and rather than getting the zone with the greatest area of intersect it returns the first record of whichever zone intersects. Here is one option that will work for your given situation.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var other_layer = FeatureSetByName($map, "Zoning Layer", ["Zoning"])

var IntF = Intersects($Feature, other_layer)
var MI = Max( IntF, 'shapeareafield' )
var F = First(Filter(IntF,'shapeareafield = @M' ))
iif( TypeOf( F == 'Feature', F["Zoning"], $feature.Zoning )

/*
Option 2
var other_layer = FeatureSetByName($map, "Zoning Layer", ["Zoning"])
var F = First(Intersects(Centroid($Feature), other_layer))
iif( TypeOf( F == 'Feature', F["Zoning"], $feature.Zoning )
*/&lt;/LI-CODE&gt;&lt;P&gt;Another would be to use the 'Centroid' function to turn your polygon to a point and get the intersecting value that way.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 14:00:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-question/m-p/1634952#M65659</guid>
      <dc:creator>RPGIS</dc:creator>
      <dc:date>2025-07-22T14:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Question</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-question/m-p/1634958#M65660</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp; This works great!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 14:13:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-question/m-p/1634958#M65660</guid>
      <dc:creator>GaryMorris</dc:creator>
      <dc:date>2025-07-22T14:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Question</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-question/m-p/1635071#M65665</link>
      <description>&lt;P&gt;You're welcome.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 16:43:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-question/m-p/1635071#M65665</guid>
      <dc:creator>RPGIS</dc:creator>
      <dc:date>2025-07-22T16:43:40Z</dc:date>
    </item>
  </channel>
</rss>

