<?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: Address Data Management Solution; Calculate left and right field &amp;quot;Search geometry cannot be null&amp;quot; in ArcGIS Solutions Questions</title>
    <link>https://community.esri.com/t5/arcgis-solutions-questions/address-data-management-solution-calculate-left/m-p/1524767#M1489</link>
    <description>&lt;P&gt;You're on the right track with using Offset but you shouldn't buffer it beforehand. I think that's what's causing the error.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Create feature set to the intersecting class using the GDB Name
var intersecting_featset = FeatureSetByName($datastore, 'Beats', [intersecting_field], true);

// Offset polyline to left and right
var left_line = Offset($feature,-5,'meters')
var right_line = Offset($feature,5,'meters')
// Find midpoints of newlines
var left_point = DistanceToCoordinate(left_line, Length(left_line)/2).coordinate
var right_point = DistanceToCoordinate(right_line, Length(right_line)/2).coordinate

// Intersect the edited feature with the feature set and retrieve the first feature
var intersected_left = First(Intersects(intersecting_featset, left_point));
var intersected_right = First(Intersects(intersecting_featset, right_point));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Aug 2024 21:46:38 GMT</pubDate>
    <dc:creator>TedHoward2</dc:creator>
    <dc:date>2024-08-20T21:46:38Z</dc:date>
    <item>
      <title>Address Data Management Solution; Calculate left and right field "Search geometry cannot be null"</title>
      <link>https://community.esri.com/t5/arcgis-solutions-questions/address-data-management-solution-calculate-left/m-p/1523869#M1484</link>
      <description>&lt;P&gt;I am working on calculating left and right fields from a line that has been offset by 5 meters and intersects an underlying polygon. Despite trying various Arcade expressions, I consistently encounter the following error:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.1/tool-reference/tool-errors-and-warnings/001001-010000/tool-errors-and-warnings-02701-02725-002717.htm" target="_blank" rel="noopener"&gt;ERROR 002712&lt;/A&gt;: Search geometry cannot be null&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Recently, I adapted a code snippet from GitHub, converting the line feature to a point feature on line 11.&amp;nbsp;I validated the expression beforehand and its shows as a valid expression.&amp;nbsp; However, I still receive the same error on line 14 when I click on apply, which indicates that the geometry cannot be null. Could you provide any insights into why this issue persists?&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// This rule will populate the edited features field with a value from an intersecting feature

// Value to copy from the intersected feature
var intersecting_field = "BEAT";
//Field rule is assigned to in the Attribute Rule
var feature_field = "leftbeat";

// Create feature set to the intersecting class using the GDB Name
var intersecting_featset = FeatureSetByName($datastore, 'Beats', [intersecting_field], true);

var intersecting_point =centroid(offset(buffer($feature,1,'meters'),-5,'meters'));

// Intersect the edited feature with the feature set and retrieve the first feature
var intersected_feature = First(Intersects(intersecting_featset, intersecting_point));

// Check to make sure there was an intersected feature, if not, return the original value
if (intersected_feature == null)
{
return $feature[feature_field];
}
// If the intersected feature is null, return the original value
if (IsEmpty(intersected_feature.BEAT))
{
return $feature[feature_field];
}
// Return the intersected features value
return intersected_feature[intersecting_field];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have managed to get this code to perform the intended calculations, but there are errors in the results. Specifically, it calculates the left field for all features except for 149, and it calculates the right field for only 149 out of 109,000 features. There are no queries involved, and the 149 features not calculated in the left field are not related to the ones calculated in the right field.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var beat = featureSetByName($datastore,'Beats',['BEAT'],true);
var leftbeat = '';
//This converts the current feature (line) to a polygon, offsets the polygon 5 meters and then converts the polygon to a point. 
var lbpoint =centroid(offset(buffer($feature,1,'meters'),5,'meters')); 

for ( var f in beat ) {
  if ( intersects( lbpoint,geometry(f) ) ) {
       var leftbeat = f.beat
       break;
   }
}

return leftbeat&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 16:45:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-solutions-questions/address-data-management-solution-calculate-left/m-p/1523869#M1484</guid>
      <dc:creator>zmontom23</dc:creator>
      <dc:date>2024-08-19T16:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Address Data Management Solution; Calculate left and right field "Search geometry cannot be null"</title>
      <link>https://community.esri.com/t5/arcgis-solutions-questions/address-data-management-solution-calculate-left/m-p/1524767#M1489</link>
      <description>&lt;P&gt;You're on the right track with using Offset but you shouldn't buffer it beforehand. I think that's what's causing the error.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Create feature set to the intersecting class using the GDB Name
var intersecting_featset = FeatureSetByName($datastore, 'Beats', [intersecting_field], true);

// Offset polyline to left and right
var left_line = Offset($feature,-5,'meters')
var right_line = Offset($feature,5,'meters')
// Find midpoints of newlines
var left_point = DistanceToCoordinate(left_line, Length(left_line)/2).coordinate
var right_point = DistanceToCoordinate(right_line, Length(right_line)/2).coordinate

// Intersect the edited feature with the feature set and retrieve the first feature
var intersected_left = First(Intersects(intersecting_featset, left_point));
var intersected_right = First(Intersects(intersecting_featset, right_point));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 21:46:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-solutions-questions/address-data-management-solution-calculate-left/m-p/1524767#M1489</guid>
      <dc:creator>TedHoward2</dc:creator>
      <dc:date>2024-08-20T21:46:38Z</dc:date>
    </item>
  </channel>
</rss>

