<?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: Create NIL (zero vertex) geometry in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1348743#M8685</link>
    <description>&lt;P&gt;Idea:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/create-nil-geometry-using-editing-tools/idc-p/1347730" target="_self"&gt;Create Nil geometry using editing tools&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Nov 2023 16:57:11 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2023-11-13T16:57:11Z</dc:date>
    <item>
      <title>Create NIL (zero vertex) geometry</title>
      <link>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1343376#M8655</link>
      <description>&lt;P&gt;In a separate post (&lt;A href="https://community.esri.com/t5/data-management-ideas/st-geometry-don-t-allow-empty-geometry/idi-p/1342907" target="_self"&gt;ST_Geometry — Don't allow empty geometry&lt;/A&gt;),&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1060"&gt;@VinceAngelo&lt;/a&gt;&amp;nbsp;mentioned:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;A NIL (zero vertex) geometry is a valid shape type. It is required for some operations (e.g., the result of the intersection of two disjoint features). The shapefile specification permits Nil paired with any other one geometry type as the supported types in shapefiles.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Are there any other ways to create&amp;nbsp;NIL (zero vertex) geometry -- other than "intersecting two disjoint features"?&lt;/P&gt;&lt;P&gt;For example, create NIL (zero vertex) geometry using &lt;U&gt;&lt;EM&gt;editing tools&lt;/EM&gt;&lt;/U&gt; in ArcGIS Pro. Use case: SQL query testing (Oracle 18c; 10.7.1 EGDB; SDE.ST_GEOMETRY).&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Edit - Related:&amp;nbsp;&lt;A href="https://gis.stackexchange.com/questions/109889/wkt-what-is-the-reasoning-behind-the-concept-of-a-point-empty" target="_self"&gt;WKT: What is the reasoning behind the concept of a POINT EMPTY?&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 14:36:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1343376#M8655</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-11-21T14:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Create NIL (zero vertex) geometry</title>
      <link>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1343446#M8656</link>
      <description>&lt;LI-CODE lang="python"&gt;pline = arcpy.Polyline(arcpy.Array(None))  # -- create a polyline with an empty array

# -- some properties
pline.length  # -- no length
0.0

pline.pointCount  # -- no points
0

pline.JSON  # -- no path to make
'{"paths":[],"spatialReference":{"wkid":null}}'

print(pline.centroid)  # -- it has no centroid
None&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 30 Oct 2023 17:45:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1343446#M8656</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-10-30T17:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create NIL (zero vertex) geometry</title>
      <link>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1343487#M8658</link>
      <description>&lt;P&gt;You can use the Well-Known Text keyword "EMPTY" to generate a NIL geometry:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy

sr = arcpy.SpatialReference(4326)

np = arcpy.FromWKT("POLYGON EMPTY",sr)
print("np - pointCount: {:d} JSON: {:s}".format(np.pointCount,np.JSON))

nl = arcpy.FromWKT("LINESTRING EMPTY",sr)
print("nl - pointCount: {:d} JSON: {:s}".format(nl.pointCount,nl.JSON))

nm = arcpy.FromWKT("MULTIPOINT EMPTY",sr)
print("nm - pointCount: {:d} JSON: {:s}".format(nm.pointCount,nm.JSON))

nx = arcpy.FromWKT("POINT EMPTY",sr)
print("nx - pointCount: {:d} JSON: {:s}".format(nx.pointCount,nx.JSON))
print("nx - firstPoint: {:s}".format(str(nx.firstPoint)))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which results in:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;np - pointCount: 0 JSON: {"rings":[],"spatialReference":{"wkid":4326,"latestWkid":4326}}
nl - pointCount: 0 JSON: {"paths":[],"spatialReference":{"wkid":4326,"latestWkid":4326}}
nm - pointCount: 0 JSON: {"points":[],"spatialReference":{"wkid":4326,"latestWkid":4326}}
nx - pointCount: 1 JSON: {"x":"NaN","y":"NaN","spatialReference":{"wkid":4326,"latestWkid":4326}}
nx - firstPoint: None&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Curiously, the &lt;FONT face="courier new,courier"&gt;PointGeometry&lt;/FONT&gt; type always returns a &lt;FONT face="courier new,courier"&gt;pointCount&lt;/FONT&gt; of one, but the &lt;FONT face="courier new,courier"&gt;firstPoint&lt;/FONT&gt; is &lt;FONT face="courier new,courier"&gt;None&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WKT can also be used at the SQL prompt in Oracle:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;SQL&amp;gt; SELECT 'POLYGON' as type,SDE.ST_ASTEXT(SDE.ST_PolyFromText('POLYGON EMPTY',4326)) as geom FROM DUAL;

TYPE
-------
GEOM
--------------------------------------------------------------------------------
POLYGON
POLYGON EMPTY

SQL&amp;gt; SELECT 'LINE   ' as type,SDE.ST_ASTEXT(SDE.ST_LineFromText('LINESTRING EMPTY',4326)) as geom FROM DUAL;

TYPE
-------
GEOM
--------------------------------------------------------------------------------
LINE
LINESTRING EMPTY

SQL&amp;gt; SELECT 'MPOINT ' as type,SDE.ST_ASTEXT(SDE.ST_MPointFromText('MULTIPOINT EMPTY',4326)) as geom FROM DUAL;

TYPE
--------
GEOM
--------------------------------------------------------------------------------
MPOINT
MULTIPOINT EMPTY

SQL&amp;gt; SELECT 'POINT  ' as type,SDE.ST_ASTEXT(SDE.ST_PointFromText('POINT EMPTY',4326)) as geom FROM DUAL;

TYPE
-------
GEOM
--------------------------------------------------------------------------------
POINT
POINT EMPTY

SQL&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 00:51:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1343487#M8658</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2023-10-31T00:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create NIL (zero vertex) geometry</title>
      <link>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1343636#M8659</link>
      <description>&lt;P&gt;For reference, the empty array trick works for &lt;FONT face="courier new,courier"&gt;Polygon&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;Polyline&lt;/FONT&gt;, and &lt;FONT face="courier new,courier"&gt;Multipoint&lt;/FONT&gt; classes, but &lt;FONT face="courier new,courier"&gt;PointGeometry&lt;/FONT&gt; won't accept a &lt;FONT face="courier new,courier"&gt;None&lt;/FONT&gt; point parameter.&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 00:58:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1343636#M8659</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2023-10-31T00:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create NIL (zero vertex) geometry</title>
      <link>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1343655#M8660</link>
      <description>&lt;P&gt;Which brings us back to the old question about arcpy.Point having a value for x and y which is a valid number.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can assign math.nan or numpy.nan to the x and y values but you have to test whether they are nan (not a number)&lt;/P&gt;&lt;P&gt;I can only wish points could just be defined from arrays&lt;/P&gt;&lt;LI-CODE lang="python"&gt;np.full(shape=(4,), fill_value=np.nan, order='C')
array([nan, nan, nan, nan])
# -- or
np.empty((0,))
array([], dtype=float64)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import math
import arcpy

p0 = arcpy.Point()  # -- sadly given default values
p0
&amp;lt;Point (0.0, 0.0, #, #)&amp;gt;

# -- define invalid x, y values 
p1 = arcpy.Point(math.nan, math.nan)
p1
&amp;lt;Point (nan, nan, #, #)&amp;gt;
#
# -- then check in code
math.isnan(p1.X)

pg0 = arcpy.PointGeometry(p0, None, None, None)
pg0[0]  # must contain a point
&amp;lt;Point (nan, nan, #, #)&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 02:09:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1343655#M8660</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-10-31T02:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Create NIL (zero vertex) geometry</title>
      <link>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1348743#M8685</link>
      <description>&lt;P&gt;Idea:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/create-nil-geometry-using-editing-tools/idc-p/1347730" target="_self"&gt;Create Nil geometry using editing tools&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 16:57:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1348743#M8685</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-11-13T16:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create NIL (zero vertex) geometry</title>
      <link>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1351679#M8686</link>
      <description>&lt;P&gt;I'm struggling with Python since I don't write Python scripts very often. Is there any chance you could provide a full script for inserting a nil geometry row into an existing polygon feature class?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 20:36:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1351679#M8686</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-11-20T20:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create NIL (zero vertex) geometry</title>
      <link>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1352208#M8691</link>
      <description>&lt;P&gt;For my notes, regarding, &lt;EM&gt;"WKT can also be used at the SQL prompt in Oracle:"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;In Oracle, functions like&amp;nbsp;SDE.ST_PolyFromText() return the subtype&amp;nbsp;&lt;SPAN&gt;[SDE.ST_POLYFROMTEXT]&lt;/SPAN&gt;&amp;nbsp;, not the supertype&amp;nbsp;&lt;SPAN&gt;[SDE.ST_GEOMETRY]&lt;/SPAN&gt; .&lt;/P&gt;&lt;P&gt;See:&amp;nbsp;&lt;A href="https://community.esri.com/t5/geodatabase-questions/is-it-ok-to-store-st-polyfromtext-in-st-geometry/m-p/1352131" target="_self"&gt;Is it ok to store ST_POLYFROMTEXT in ST_GEOMETRY shape column?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1700596482296.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/86765iBB1E18D1E6F37FE4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1700596482296.png" alt="Bud_0-1700596482296.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I suspect that might be a problem: &lt;EM&gt;Esri Canada Case #03491474 -&amp;nbsp;Is it ok to store ST_POLYFROMTEXT in ST_GEOMETRY shape column?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This bug report suggests to &lt;EM&gt;"...convert any geometry values which were created with a subtype to st_geometry, &lt;STRONG&gt;by using the st_geometry constructor.&lt;/STRONG&gt;"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Bug: &lt;A href="https://support.esri.com/en-us/knowledge-base/bug-unable-to-define-a-query-layer-in-arcgis-where-the-000011333" target="_self"&gt;Unable to define a query layer in ArcGIS where the data source uses an st_geometry subtype in Oracle&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;That seems to work:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_1-1700596687313.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/86770iAD57F4569C5B7D70/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bud_1-1700596687313.png" alt="Bud_1-1700596687313.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For what it's worth, I think &lt;EM&gt;"by using the st_geometry constructor."&lt;/EM&gt; is a recent addition to that bug report. That part wasn't included in the bug report previously; Esri must have added it to clarify how to convert from the subtype to the supertype.&lt;/P&gt;&lt;P&gt;GIS Stack Exchange: &lt;A href="https://gis.stackexchange.com/questions/218558/get-arcgis-to-recognize-st-point" target="_self"&gt;Get ArcGIS to recognize ST_POINT&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_2-1700596972438.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/86779i4617630AFD318F35/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_2-1700596972438.png" alt="Bud_2-1700596972438.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Ideas:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/t5/arcgis-enterprise-ideas/improve-the-docs-how-to-quot-convert-st-point/idi-p/1184196" target="_self"&gt;Improve the docs: How to "Convert ST_POINT subtype to ST_GEOMETRY supertype"?&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/t5/arcgis-enterprise-ideas/function-to-convert-from-st-geometry-subtype-to/idi-p/1171376" target="_self"&gt;Function to convert from ST_GEOMETRY subtype to supertype&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 20:17:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1352208#M8691</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-11-21T20:17:45Z</dc:date>
    </item>
  </channel>
</rss>

