<?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: Help with Intersect / Intersection Attribute Rule in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-intersect-intersection-attribute-rule/m-p/1104522#M46329</link>
    <description>&lt;P&gt;Oh, sure! Instead of an output string, you could just use a numeric value. Make these changes to the "complex" expression and see how it works.&lt;/P&gt;&lt;PRE&gt;Line  7 → var out_area = 0&lt;BR /&gt;...&lt;BR /&gt;Line 18 → out_area += a&lt;BR /&gt;...&lt;BR /&gt;Line 21 → return out_area&lt;/PRE&gt;&lt;P&gt;So instead of creating a cumulative string, you're adding up cumulative sum.&lt;/P&gt;</description>
    <pubDate>Mon, 04 Oct 2021 19:02:39 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2021-10-04T19:02:39Z</dc:date>
    <item>
      <title>Help with Intersect / Intersection Attribute Rule</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-intersect-intersection-attribute-rule/m-p/1103603#M46199</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;Hello, I am trying to determine the correct rule code for determining the amount of acreage within another polygon.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For Example: I have a feature named Tracts that may or may not contain floodplain acreage (Feature name Floodplain).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone help me out? ..... This is what I have now.... but it is not pulling the correct acreage, and I think the correct function would be INTERSECTION, but not sure.&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR FLOODPLAIN = FeatureSetByName($datastore, "RES_FLOOD_HAZARD")&lt;/P&gt;&lt;P&gt;VAR INTERSECTSFLOOD = INTERSECTS($FEATURE,FLOODPLAIN)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;area(intersectsflood, 'acres')&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 30 Sep 2021 16:25:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-with-intersect-intersection-attribute-rule/m-p/1103603#M46199</guid>
      <dc:creator>Robswann</dc:creator>
      <dc:date>2021-09-30T16:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Intersect / Intersection Attribute Rule</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-intersect-intersection-attribute-rule/m-p/1103616#M46200</link>
      <description>&lt;P&gt;You guess correctly, you'll need Intersection to get the geometry of the overlapping area. However, this function requires two geometries as parameters, and you're working with a FeatureSet.&lt;/P&gt;&lt;H3&gt;Simple Version: Getting Intersection of Single Feature&lt;/H3&gt;&lt;LI-CODE lang="javascript"&gt;var floodplain = FeatureSetByName($datastore, "RES_FLOOD_HAZARD")

// Grab the first item for the intersects featureset
var flood_feat = First(Intersects($FEATURE, floodplain))

// Get intersection, calculate area
var xs = Intersection(flood_feat, $feature)

// Calculate acreage
return Area(xs) // multiply by some value, depending on the area units in use&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, a single tract may intersect with &lt;EM&gt;multiple&lt;/EM&gt; flood zones, and we may want to capture this information.&lt;/P&gt;&lt;H3&gt;Complex: Return a List of Intersected Areas&lt;/H3&gt;&lt;LI-CODE lang="javascript"&gt;var floodplain = FeatureSetByName($datastore, "RES_FLOOD_HAZARD")

// Get FeatureSet of intersecting flood zones
var flood_fs = Intersects($FEATURE, floodplain))

// Instantiate output string
var out_str = 'Flood Zone Acreage:'

// Iterate over FeatureSet
for(var f in flood_fs){
    // Get intersection, calculate area
    var xs = Intersection(f, $feature)

    // Calculate acreage
    var a = Area(xs) // multiply by some value, depending on the area units in use

    // Append to output string
    out_str += `\n${f.flood_zone_identifier_field} | ${a} ac`
}

return out_str&lt;/LI-CODE&gt;&lt;P&gt;This will return something like&lt;/P&gt;&lt;PRE&gt;Flood Zone Acreage:&lt;BR /&gt;Zone AE | 12.1 ac&lt;BR /&gt;Zone X | 6.23 ac&amp;nbsp;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Sep 2021 16:56:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-with-intersect-intersection-attribute-rule/m-p/1103616#M46200</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-09-30T16:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Intersect / Intersection Attribute Rule</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-intersect-intersection-attribute-rule/m-p/1103646#M46204</link>
      <description>&lt;P&gt;Thanks again for the help. For some reason the expression states it is valid, but will not save? I have tried everything from saving closing out, restarting ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 17:53:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-with-intersect-intersection-attribute-rule/m-p/1103646#M46204</guid>
      <dc:creator>Robswann</dc:creator>
      <dc:date>2021-09-30T17:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Intersect / Intersection Attribute Rule</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-intersect-intersection-attribute-rule/m-p/1103664#M46206</link>
      <description>&lt;P&gt;Thanks I figured it out, any way I could just sum all the zones within that feature?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 18:42:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-with-intersect-intersection-attribute-rule/m-p/1103664#M46206</guid>
      <dc:creator>Robswann</dc:creator>
      <dc:date>2021-09-30T18:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Intersect / Intersection Attribute Rule</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-intersect-intersection-attribute-rule/m-p/1104511#M46327</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;.&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;Any way I could just sum all the zones within that feature to return a value of the total flood acreage?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 18:43:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-with-intersect-intersection-attribute-rule/m-p/1104511#M46327</guid>
      <dc:creator>Robswann</dc:creator>
      <dc:date>2021-10-04T18:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Intersect / Intersection Attribute Rule</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-intersect-intersection-attribute-rule/m-p/1104522#M46329</link>
      <description>&lt;P&gt;Oh, sure! Instead of an output string, you could just use a numeric value. Make these changes to the "complex" expression and see how it works.&lt;/P&gt;&lt;PRE&gt;Line  7 → var out_area = 0&lt;BR /&gt;...&lt;BR /&gt;Line 18 → out_area += a&lt;BR /&gt;...&lt;BR /&gt;Line 21 → return out_area&lt;/PRE&gt;&lt;P&gt;So instead of creating a cumulative string, you're adding up cumulative sum.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 19:02:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-with-intersect-intersection-attribute-rule/m-p/1104522#M46329</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-10-04T19:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Intersect / Intersection Attribute Rule</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-intersect-intersection-attribute-rule/m-p/1104538#M46333</link>
      <description>&lt;P&gt;This is very helpful. Thanks again!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 19:33:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-with-intersect-intersection-attribute-rule/m-p/1104538#M46333</guid>
      <dc:creator>Robswann</dc:creator>
      <dc:date>2021-10-04T19:33:07Z</dc:date>
    </item>
  </channel>
</rss>

