<?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: Select features that have blank shapes in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1356825#M44836</link>
    <description>&lt;P&gt;Regarding &lt;EM&gt;Esri Case&amp;nbsp;03477586 -&amp;nbsp;Are these features valid? Features have SHAPE but geometry is null&lt;/EM&gt;:&lt;/P&gt;&lt;P&gt;Support submitted&amp;nbsp;&lt;EM&gt;ENH-000163451: Provide confirmation on valid ST_Geometry configurations&lt;/EM&gt;.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Dec 2023 15:09:47 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2023-12-05T15:09:47Z</dc:date>
    <item>
      <title>Select features that have blank shapes</title>
      <link>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1346965#M44764</link>
      <description>&lt;P&gt;&lt;EM&gt;ArcGIS Pro 2.6.8; Oracle 18c; 10.7.1 EGDB; SDE.ST_GEOMETRY&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Background:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;There seem to be four different states a feature can be in:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Has shape and geometry. Normal polygon; visible in the map.&lt;/LI&gt;&lt;UL&gt;&lt;LI&gt;Geometry's points blob can be considered a list of coordinates like "(1,2 3,4 5,6)".&lt;/LI&gt;&lt;/UL&gt;&lt;LI&gt;Has shape and geometry, but&amp;nbsp;AREA and NUMPTS are zero (geometry is NIL/zero vertex).&lt;/LI&gt;&lt;UL&gt;&lt;LI&gt;Geometry's points blob can be considered an empty list of coordinates like "( , )".&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1343655/" target="_blank" rel="noopener"&gt;Create NIL (zero vertex) geometry&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI&gt;Has shape, but no geometry.&lt;/LI&gt;&lt;UL&gt;&lt;LI&gt;Geometry is null.&lt;/LI&gt;&lt;LI&gt;Esri Support thinks these features are valid.&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;Esri Case #03477586 - Are these features valid? Features have SHAPE but geometry is null.&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;It sounds like ST_GEOMETRY SQL functions have been designed/fixed to handle such features (Support provided details about the bug that would suggest this):&lt;BR /&gt;&lt;EM&gt;BUG-000090937: Invalid (NULL) LOB locator (points) errors are returned when running the ST_Geometry function against geometries without binary large object (BLOB) points. &lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;It is possible to INSERT features that have a null geometry using SQL. The ST_GEOMETRY db datatype does not prevent null geometries from being inserted.&lt;PRE&gt;insert into infrastr.inf_record_sp (objectid, shape) values (&lt;BR /&gt;sde.gdb_util.next_rowid('INFRASTR', 'INF_RECORD_SP'), &lt;BR /&gt;SDE.ST_GEOMETRY(16,0,0,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,300046,&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;NULL&lt;/STRONG&gt;&lt;/FONT&gt;));&lt;BR /&gt;commit;&lt;/PRE&gt;Similarly, it’s possible to import such features from an XML Workspace Document; the geometry remains in state 3. However, other operations in ArcGIS Pro will automatically convert state 3 features to state 2, such as when&amp;nbsp;&lt;SPAN&gt;editing in the attribute table (even when editing a non-spatial field).&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI&gt;The shape field is completely null.&lt;/LI&gt;&lt;UL&gt;&lt;LI&gt;Geometry is null.&lt;/LI&gt;&lt;LI&gt;Example: If a user hits “Click to add new row” in the attribute table, then the shape will be null unless the user edits/creates a shape.&lt;/LI&gt;&lt;/UL&gt;&lt;/OL&gt;&lt;P&gt;&lt;BR /&gt;&lt;U&gt;Summary Query:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1699401530063.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/85316i7B382B9370FB8824/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1699401530063.png" alt="Bud_0-1699401530063.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;BR /&gt;Question:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;What is the correct way to query for&amp;nbsp;features that have blank shapes?&amp;nbsp;In other words, I want to query for states 2, 3, and 4 (but not state 1). A simple "WHERE SHAPE IS NULL" query won't do what I want; it won't select states 2 and 3 since SHAPE isn't null.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;U&gt;Related:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Oracle Docs: &lt;A href="https://docs.oracle.com/en/database/oracle/oracle-database/21/adobj/Sql-object-types-and-references.html#GUID-821233F6-ABA9-4100-B5E4-937F7DC57102" target="_self"&gt;2.1.1 Null Objects and Attributes&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 15:07:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1346965#M44764</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-12-05T15:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Select features that have blank shapes</title>
      <link>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1346966#M44765</link>
      <description>&lt;P&gt;This seems to work. I’m not sure if it’s the best way or not.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;where&amp;nbsp;&lt;BR /&gt;    (sde.st_isempty(shape) = 1 &lt;BR /&gt;     or shape is null)&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Edit:&lt;/P&gt;&lt;P&gt;Or, I could count the vertices. And replace null vertex counts with 0 using the NVL function (Oracle-specific) or COALESCE (database agnostic).&lt;/P&gt;&lt;PRE&gt;where&lt;BR /&gt;    nvl(sde.st_numpoints(a.shape), 0) = 0&lt;/PRE&gt;&lt;P&gt;The benefit of that approach is that it's shorter (only one expression instead of two). But I don't think it's as obvious what it does, so I might stick with the first approach.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 16:11:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1346966#M44765</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-12-01T16:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Select features that have no spatial information (will not display in the map)</title>
      <link>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1347005#M44766</link>
      <description>&lt;P&gt;This Community is not really the place to find out what Esri Inc recommends. Most staffers here don't have the privilege to speak for the company, so explicitly asking for that is going to suppress responses from non-employees and employees both (probably not what you're shooting for here).&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 03:17:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1347005#M44766</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2023-11-08T03:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Select features that have no spatial information (will not display in the map)</title>
      <link>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1347015#M44767</link>
      <description>&lt;P&gt;Ok, I removed that part. If you want, you can delete your reply, now that it no longer applies. And I can delete this one too.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 04:30:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1347015#M44767</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-11-08T04:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Select features that have blank shapes</title>
      <link>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1348761#M44778</link>
      <description>&lt;P&gt;In my case, I have an issue in my data where selecting WHERE SHAPE IS NULL actually selects rows where shape is &lt;U&gt;&lt;EM&gt;not&lt;/EM&gt;&lt;/U&gt; null.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1699895709629.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/85790i1C6267B0614A4E71/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1699895709629.png" alt="Bud_0-1699895709629.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It's a surprising issue; Oracle isn't querying the data correctly due to the SHAPE values being broken.&lt;/P&gt;&lt;P&gt;Esri Case #03477586&lt;BR /&gt;&lt;A href="https://support.esri.com/en-us/bug/incorrect-result-returned-from-query-shape-is-null-afte-bug-000115133" target="_self"&gt;BUG-000115133&lt;/A&gt;: Incorrect result returned from query "shape is null" after migrating storage from sdelob to st_geometry and transferring Feature Class using Oracle datapump utility.&lt;/P&gt;&lt;P&gt;Best guess is:&lt;BR /&gt;My organization moved from SDEBINARY to ST_GEOMETRY as part of an old upgrade project from 9.3.1 to 10.x (7-8 years ago). The transition from&amp;nbsp;SDEBINARY to ST_GEOMETRY must have broken the SHAPES. We don't have the SHAPE IS NULL issue in rows that were created after that migration; we only have the issue in old rows.&lt;BR /&gt;With this particular FC, we wouldn't have needed to update the rows using a field calculation, import/export, Catalog copy/paste, etc. Doing operations like that would automatically fix the shapes. Even a simple field calculation on a non-spatial field would automatically fix the shapes. But we likely didn't need to do that for this FC (whereas with other FCs, we do lots of field calculations on the entire table). So that's likely why we didn't catch the issue until now. Further, querying for WHERE SHAPE IS NULL is relatively rare.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, in this particular scenario, I want to avoid SHAPE IS NULL, since that doesn't work properly (at least not until I fix all our old data). I'll use isEmpty to find null shapes instead:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;where&lt;BR /&gt;    (sde.st_isempty(a.shape) = 1 &lt;BR /&gt;    or sde.&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;st_isempty&lt;/STRONG&gt;&lt;/FONT&gt;(a.shape) &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;is null&lt;/STRONG&gt;&lt;/FONT&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For my notes, here is a screenshot of my testing data -- with state #3 split out into #3a and #3b:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_1-1699895835726.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/85791i82F35E12DEAFE7D7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_1-1699895835726.png" alt="Bud_1-1699895835726.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;select
    a.objectid,
    a.comment2 as state_num,
    a.shape,
    (a.shape).points as geometry,
    sde.st_area(a.shape) as area,
    sde.st_isempty(a.shape) as is_empty,
    a.comment3,
    case 
        when b.objectid is not null then 'NOT NULL'
        when b.objectid is     null then 'NULL'
    end as null_flag_join, --I used a join for this since a regular case statement on table "a" doesn't produce the same result.    
    case 
        when a.shape is not null then 'NOT NULL'
        when a.shape is     null then 'NULL'
    end as null_flag_case,
    sde.st_numpoints(a.shape) as num_points
from
    infrastr.inf_record_sp a
left join
    (select objectid from infrastr.inf_record_sp where shape is not null) b
    on a.objectid = b.objectid
where
    a.comment2 in ('1','2','3a','3b','4')
order by
    state_num&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Nov 2023 13:46:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1348761#M44778</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-11-18T13:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Select features that have blank shapes</title>
      <link>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1351243#M44791</link>
      <description>&lt;P&gt;If you upgrade to ArcGIS Pro 2.7 the Check Geometry tool supports enterprise geodatabases.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/check-geometry.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/check-geometry.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Running this tool will tell you if the the feature has null geometry when the the feature has no geometry or the shape field is null.&lt;/P&gt;&lt;P&gt;It may be that your scenario is more complicated than this but worth having an attempt?&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2023 01:32:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1351243#M44791</guid>
      <dc:creator>ChristopherCounsell</dc:creator>
      <dc:date>2023-11-19T01:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: Select features that have blank shapes</title>
      <link>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1351256#M44792</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/412943"&gt;@ChristopherCounsell&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;The check geometry tool doesn’t support ESRI’s ST_Geometry datatype (for Oracle), which is the datatype I use.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 13:40:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1351256#M44792</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-11-28T13:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Select features that have blank shapes</title>
      <link>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1351278#M44793</link>
      <description>&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/validating-data/an-overview-of-data-reviewer-checks-in-arcgis-pro.htm#:~:text=Event%20checks%20%20%20%20Check%20name%20,that%20over%20...%20%201%20more%20rows%20" target="_blank" rel="noopener"&gt;ArcGIS Data Reviewer checks—ArcGIS Pro | Documentation&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/validating-data/methods-to-implement-automated-validation.htm" target="_blank" rel="noopener"&gt;Methods to implement automated review—ArcGIS Pro | Documentation&lt;/A&gt;&lt;BR /&gt;Reviewer rules in a geodatabase (attribute rule-based workflows)&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/validating-data/invalid-geometry.htm" target="_blank" rel="noopener"&gt;Check Geometry—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/data-reviewer/data-management/invalid-geometry-check-explained/" target="_blank" rel="noopener"&gt;Invalid Geometry Check Explained… (esri.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The check returns features that meet one of the following conditions:&lt;/P&gt;&lt;P&gt;1. Nothing&lt;/P&gt;&lt;P&gt;2. Empty&lt;/P&gt;&lt;P&gt;3. Has an empty envelope&lt;/P&gt;&lt;P&gt;4. Not simple&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2023 19:30:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1351278#M44793</guid>
      <dc:creator>MarceloMarques</dc:creator>
      <dc:date>2023-11-19T19:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Select features that have blank shapes</title>
      <link>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1356825#M44836</link>
      <description>&lt;P&gt;Regarding &lt;EM&gt;Esri Case&amp;nbsp;03477586 -&amp;nbsp;Are these features valid? Features have SHAPE but geometry is null&lt;/EM&gt;:&lt;/P&gt;&lt;P&gt;Support submitted&amp;nbsp;&lt;EM&gt;ENH-000163451: Provide confirmation on valid ST_Geometry configurations&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 15:09:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/select-features-that-have-blank-shapes/m-p/1356825#M44836</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-12-05T15:09:47Z</dc:date>
    </item>
  </channel>
</rss>

