<?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: Attribute Assistant Intersecting Feature Method -&amp;gt; Attribute Rule? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-assistant-intersecting-feature-method-gt/m-p/1217766#M60563</link>
    <description>&lt;P&gt;Intersects() finds all intersecting features. In the next step, you have to get the actual Intersection() and find the longest one.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// find intersecting streets
var streetLayer = FeaturesetByName($datastore, "baseStreetCenterline", ["ST_NAME"], true)
var streetIntersect = Intersects(streetLayer, $feature);

// find the street with the longest intersection
var name = null
var max_length = -1
for (var street in streetIntersect) {
    // get the intersection
    var segment = Intersection($feature, street)
    // get the intersection's length
    // if the line and polygon only touch at one vertex, segment will be null
    var segment_length = IIF(segment == null, 0, Length(segment))
    // compare to max_length, set name
    if(segment_length &amp;gt; max_length) {
        max_length = segment_length
        name = street.ST_NAME
    }
}
return name&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 30 Sep 2022 07:44:21 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2022-09-30T07:44:21Z</dc:date>
    <item>
      <title>Attribute Assistant Intersecting Feature Method -&gt; Attribute Rule?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-assistant-intersecting-feature-method-gt/m-p/1217679#M60558</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to convert from using Attribute Assistant to Attribute Rules and I'm struggling with one of my old rules built with the INTERSECTING_FEATURE method.&amp;nbsp; Here's the problem:&lt;/P&gt;&lt;P&gt;I'm mapping parking blocks and I need to pick up the street name of the longest intersecting street segment (S 19th St in the simple illustration below)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Steve_SchunzelAtTacoma_0-1664491802080.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/52588i46FAEB86398E4283/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Steve_SchunzelAtTacoma_0-1664491802080.png" alt="Steve_SchunzelAtTacoma_0-1664491802080.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The ArcMap/AA method worked beautifully and seemed to pick up the longest edge most of the time.&amp;nbsp; However with the new Attribute Rule that I set up (using Pro 3.0), it seems to pick up the other streets that it intersects with, even if it's just one vertex (COURT D or FAWCETT AVE above).&amp;nbsp; When I loop through all the features it seems random, so I can't use the FIRST function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I'm still not understanding the fundamentals about how the Intersects function works.&amp;nbsp; Does anyone have any suggestions on how to filter out the street segment with the longest intersecting edge?&lt;/P&gt;&lt;P&gt;Thank for you thoughts and suggestions!&lt;/P&gt;&lt;P&gt;Here's my code:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;//Cycle through all intersecting streets and return street name&lt;BR /&gt;var streetLayer = FeatureSetByName($datastore,"baseStreetCenterline", ["ST_NAME"]);&lt;BR /&gt;var searchDistance = 0;&lt;BR /&gt;var streetIntersect = Intersects(streetLayer, $feature);&lt;BR /&gt;var cnt = Count(streetIntersect);&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;var name = Null&lt;BR /&gt;if (cnt &amp;gt; 0) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var street in streetIntersect) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name = street.ST_NAME;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // pass no features found within search distance, name remains null&lt;BR /&gt;}&lt;BR /&gt;return name;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 22:57:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-assistant-intersecting-feature-method-gt/m-p/1217679#M60558</guid>
      <dc:creator>tSteve_SchunzelAtTacoma</dc:creator>
      <dc:date>2022-09-29T22:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Assistant Intersecting Feature Method -&gt; Attribute Rule?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-assistant-intersecting-feature-method-gt/m-p/1217766#M60563</link>
      <description>&lt;P&gt;Intersects() finds all intersecting features. In the next step, you have to get the actual Intersection() and find the longest one.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// find intersecting streets
var streetLayer = FeaturesetByName($datastore, "baseStreetCenterline", ["ST_NAME"], true)
var streetIntersect = Intersects(streetLayer, $feature);

// find the street with the longest intersection
var name = null
var max_length = -1
for (var street in streetIntersect) {
    // get the intersection
    var segment = Intersection($feature, street)
    // get the intersection's length
    // if the line and polygon only touch at one vertex, segment will be null
    var segment_length = IIF(segment == null, 0, Length(segment))
    // compare to max_length, set name
    if(segment_length &amp;gt; max_length) {
        max_length = segment_length
        name = street.ST_NAME
    }
}
return name&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 30 Sep 2022 07:44:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-assistant-intersecting-feature-method-gt/m-p/1217766#M60563</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-09-30T07:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Assistant Intersecting Feature Method -&gt; Attribute Rule?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-assistant-intersecting-feature-method-gt/m-p/1217894#M60578</link>
      <description>&lt;P&gt;You're a genius Johannes!!&amp;nbsp; That works perfectly, thank you!!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 14:52:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-assistant-intersecting-feature-method-gt/m-p/1217894#M60578</guid>
      <dc:creator>tSteve_SchunzelAtTacoma</dc:creator>
      <dc:date>2022-09-30T14:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Assistant Intersecting Feature Method -&gt; Attribute Rule?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-assistant-intersecting-feature-method-gt/m-p/1409918#M81857</link>
      <description>&lt;P&gt;Has anyone been able to figure out how to set this up referencing boundary layers in another database?&amp;nbsp; Attribute Assistant could do it in the map, but since Attribute Rules are in the database, it can only look at other layers in the same database.&amp;nbsp; I'm not adding the parcels, neighborhoods, zip codes, addresses, municipalities, and county boundary to each database where we edit to make something work in Pro that worked in ArcGIS Desktop...&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 20:50:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-assistant-intersecting-feature-method-gt/m-p/1409918#M81857</guid>
      <dc:creator>GelcysWilliams</dc:creator>
      <dc:date>2024-04-15T20:50:44Z</dc:date>
    </item>
  </channel>
</rss>

