<?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>idea Count vertices to determine if shape is null in Attribute Rules Ideas</title>
    <link>https://community.esri.com/t5/attribute-rules-ideas/count-vertices-to-determine-if-shape-is-null/idi-p/1381800</link>
    <description>&lt;P&gt;&lt;SPAN&gt;As &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/3521"&gt;@AJR&lt;/a&gt;&amp;nbsp;mentioned in&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/how-to-return-null-in-arcade-with-calculate-field/m-p/1381710/highlight/true#M78704" target="_self"&gt;How to return null in Arcade with Calculate Field (python works fine)?&lt;/A&gt; :&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;[I want to] use an arcade expression to operate on the shape and some of the shapes are null.&amp;nbsp; There doesn't seem to be any way in arcade to detect if the shape is null before attempting to use it (i.e. intersect it with another feature class).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;...There isn't an arcade function to count the number of vertices in a shape -&lt;A href="https://developers.arcgis.com/arcade/function-reference/geometry_functions/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developers.arcgis.com/arcade/function-reference/geometry_functions/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;using Count(Text(Geometry($feature))) returns a result when used in the field calculator (null shapes are returned as empty strings), but trying to use Count(Text(Geometry($feature))) &amp;gt; 0 as a null shape filter fails when used as part of an attribute rule (i.e. null shapes pass the check)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Could functionality be added to Arcade for attribute rules that lets us count vertices — so that we can determine if the shape is null?&lt;/P&gt;</description>
    <pubDate>Tue, 13 Feb 2024 19:12:59 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2024-02-13T19:12:59Z</dc:date>
    <item>
      <title>Count vertices to determine if shape is null</title>
      <link>https://community.esri.com/t5/attribute-rules-ideas/count-vertices-to-determine-if-shape-is-null/idi-p/1381800</link>
      <description>&lt;P&gt;&lt;SPAN&gt;As &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/3521"&gt;@AJR&lt;/a&gt;&amp;nbsp;mentioned in&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/how-to-return-null-in-arcade-with-calculate-field/m-p/1381710/highlight/true#M78704" target="_self"&gt;How to return null in Arcade with Calculate Field (python works fine)?&lt;/A&gt; :&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;[I want to] use an arcade expression to operate on the shape and some of the shapes are null.&amp;nbsp; There doesn't seem to be any way in arcade to detect if the shape is null before attempting to use it (i.e. intersect it with another feature class).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;...There isn't an arcade function to count the number of vertices in a shape -&lt;A href="https://developers.arcgis.com/arcade/function-reference/geometry_functions/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developers.arcgis.com/arcade/function-reference/geometry_functions/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;using Count(Text(Geometry($feature))) returns a result when used in the field calculator (null shapes are returned as empty strings), but trying to use Count(Text(Geometry($feature))) &amp;gt; 0 as a null shape filter fails when used as part of an attribute rule (i.e. null shapes pass the check)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Could functionality be added to Arcade for attribute rules that lets us count vertices — so that we can determine if the shape is null?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 19:12:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-ideas/count-vertices-to-determine-if-shape-is-null/idi-p/1381800</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-02-13T19:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Count vertices to determine if shape is null</title>
      <link>https://community.esri.com/t5/attribute-rules-ideas/count-vertices-to-determine-if-shape-is-null/idc-p/1382057#M205</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/351335"&gt;@Bud&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FWIW I was able to run this expression as an attribute rule calculation to identify features with no vertices (empty geometry) using ArcGIS Pro 3.2.2:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if (IsEmpty(Geometry($feature))) return null;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 08:42:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-ideas/count-vertices-to-determine-if-shape-is-null/idc-p/1382057#M205</guid>
      <dc:creator>AmirBar-Maor</dc:creator>
      <dc:date>2024-02-14T08:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Count vertices to determine if shape is null</title>
      <link>https://community.esri.com/t5/attribute-rules-ideas/count-vertices-to-determine-if-shape-is-null/idc-p/1382239#M206</link>
      <description>&lt;P&gt;This function differentiates between null and empty geometries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function empty_null_shape(geo) {
    return Decode(TypeOf(geo),
        "", "null",
        "Point", IIF(IsNan(geo.X), "empty point", "point"),
        "Polyline", IIF(Count(geo.paths) == 0, "empty polyline", "polyline"),
        "Polygon", IIF(Count(geo.rings) == 0, "empty polygon", "polygon"),
        "Multipoint", IIF(Count(geo.points) == 0, "empty multipoint", "multipoint"),
        "?" // Default
    )
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaulLeBlanc1_0-1707925042749.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/94751i4F19EB960593611F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PaulLeBlanc1_0-1707925042749.png" alt="PaulLeBlanc1_0-1707925042749.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 15:37:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-ideas/count-vertices-to-determine-if-shape-is-null/idc-p/1382239#M206</guid>
      <dc:creator>PaulLeBlanc1</dc:creator>
      <dc:date>2024-02-14T15:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Count vertices to determine if shape is null</title>
      <link>https://community.esri.com/t5/attribute-rules-ideas/count-vertices-to-determine-if-shape-is-null/idc-p/1384720#M208</link>
      <description>&lt;P&gt;This idea can be closed. Misunderstanding/bad data.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 01:20:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-ideas/count-vertices-to-determine-if-shape-is-null/idc-p/1384720#M208</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-02-21T01:20:51Z</dc:date>
    </item>
  </channel>
</rss>

