<?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 Attribute Rule that allows a Spatial Join on Line Ending ONLY in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-that-allows-a-spatial-join-on-line/m-p/1139142#M302</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am looking for a very specific Attribute rule to be set up. I am not sure how this would be even set up. I am looking to create an Attribute Rule that will populate a GlobalID from one feature to another based on where the end of the line feature are snapped to one another. This is all taking place in the same feature class. Most of the lines are drawn in the same direction and I am looking to have it ONLY where the ENDS of the line are snapped to one another and then populate the linking GlobalID field on the other feature class. It has to be on the end only because the GlobalID's can only be in a certain direction.&lt;/P&gt;&lt;P&gt;Example&amp;nbsp;&lt;/P&gt;&lt;P&gt;Start of line: O&lt;/P&gt;&lt;P&gt;End of Line: X&lt;/P&gt;&lt;P&gt;O--------Line-1--------X----Line-2-----------O----------Line-3---------X&lt;/P&gt;&lt;P&gt;I am looking for where Line 1 and Line 2 meet NOT line 2 and Line 3&lt;/P&gt;&lt;P&gt;If you need further information please say so.&lt;/P&gt;&lt;P&gt;Thank you in advanced.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 31 Jan 2022 21:54:21 GMT</pubDate>
    <dc:creator>CHedger1227</dc:creator>
    <dc:date>2022-01-31T21:54:21Z</dc:date>
    <item>
      <title>Attribute Rule that allows a Spatial Join on Line Ending ONLY</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-that-allows-a-spatial-join-on-line/m-p/1139142#M302</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am looking for a very specific Attribute rule to be set up. I am not sure how this would be even set up. I am looking to create an Attribute Rule that will populate a GlobalID from one feature to another based on where the end of the line feature are snapped to one another. This is all taking place in the same feature class. Most of the lines are drawn in the same direction and I am looking to have it ONLY where the ENDS of the line are snapped to one another and then populate the linking GlobalID field on the other feature class. It has to be on the end only because the GlobalID's can only be in a certain direction.&lt;/P&gt;&lt;P&gt;Example&amp;nbsp;&lt;/P&gt;&lt;P&gt;Start of line: O&lt;/P&gt;&lt;P&gt;End of Line: X&lt;/P&gt;&lt;P&gt;O--------Line-1--------X----Line-2-----------O----------Line-3---------X&lt;/P&gt;&lt;P&gt;I am looking for where Line 1 and Line 2 meet NOT line 2 and Line 3&lt;/P&gt;&lt;P&gt;If you need further information please say so.&lt;/P&gt;&lt;P&gt;Thank you in advanced.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 21:54:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-that-allows-a-spatial-join-on-line/m-p/1139142#M302</guid>
      <dc:creator>CHedger1227</dc:creator>
      <dc:date>2022-01-31T21:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule that allows a Spatial Join on Line Ending ONLY</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-that-allows-a-spatial-join-on-line/m-p/1139298#M303</link>
      <description>&lt;P&gt;Something like this?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// load the line fc
var lines = FeatureSetByName($datastore, "NameOfLineFC", ["GlobalID"], true)
// intersect with current line
var intersecting_lines = Intersects($feature, lines)
// we intersected $feature with itself, so we need to filter it out
var f_gid = $feature.GlobalID
intersecting_lines = Filter(intersecting_lines, "GlobalID &amp;lt;&amp;gt; @f_gid")

// loop through all intersecting lines
// return the GlobalID of the first line where the end point is the same as $feature's end point
var feature_end = Geometry($feature).paths[0][-1]
for(var line in intersecting_lines) {
  var line_end = Geometry(line).paths[0][-1]
  if(Intersects(feature_end, line_end)) {
    return line.GlobalID
  }
}
// if we land here, there is no line with intersecting end point
return null&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 01 Feb 2022 10:09:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-that-allows-a-spatial-join-on-line/m-p/1139298#M303</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-02-01T10:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule that allows a Spatial Join on Line Ending ONLY</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-that-allows-a-spatial-join-on-line/m-p/1159229#M369</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp; Can this be used to do a point to a line feature instead of a line feature to itself? would there be a big difference if I wanted to do this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 03:52:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-that-allows-a-spatial-join-on-line/m-p/1159229#M369</guid>
      <dc:creator>GdB_Admin</dc:creator>
      <dc:date>2022-03-30T03:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule that allows a Spatial Join on Line Ending ONLY</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-that-allows-a-spatial-join-on-line/m-p/1159255#M370</link>
      <description>&lt;LI-CODE lang="javascript"&gt;// load the point fc
var points = FeatureSetByName($datastore, "NameOfPointFC", ["GlobalID"], true)
// intersect with current line
var intersecting_points = Intersects($feature, points)

// loop through all intersecting points
// return the GlobalID of the first point that lies on the $feature's end point
var feature_end = Geometry($feature).paths[0][-1]
for(var p in intersecting_points) {
  if(Intersects(feature_end, p)) {
    return p.GlobalID
  }
}
// if we land here, there is no point on the $feature's end point
return null&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 30 Mar 2022 07:57:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-that-allows-a-spatial-join-on-line/m-p/1159255#M370</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-03-30T07:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule that allows a Spatial Join on Line Ending ONLY</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-that-allows-a-spatial-join-on-line/m-p/1159524#M373</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are amazing thank you so much for taking the time to explain that to me&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 17:13:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-that-allows-a-spatial-join-on-line/m-p/1159524#M373</guid>
      <dc:creator>GdB_Admin</dc:creator>
      <dc:date>2022-03-30T17:13:46Z</dc:date>
    </item>
  </channel>
</rss>

