<?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 Empty Geometry ArcGIS 10.2 in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/create-empty-geometry-arcgis-10-2/m-p/61619#M2175</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not even sure updating the Shape field is supported in the Field Calculator.&amp;nbsp; I tried a few quick things and none of them worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In terms of ArcPy and cursors, the new ArcPy Data Access cursors do not support empty geometries.&amp;nbsp; If you try to insert or update an empty geometry using those cursors, it will simply get converted to a NULL value in the Shape field of the table.&amp;nbsp; Fortunately, the older/original cursors do support empty geometries.&amp;nbsp; If you select the records in the layer you want to update, the following code in the interactive Python window will&lt;/P&gt;&lt;P&gt;replace their existing geometries with empty geometries (assuming you are working with polygons).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; cur = arcpy.UpdateCursor("layer") #replace "layer" with layer name to be updated.
&amp;gt;&amp;gt;&amp;gt; for row in cur:
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue("SHAPE", arcpy.Polygon(arcpy.Array(None)))
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cur.updateRow(row)
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 22:20:20 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2021-12-10T22:20:20Z</dc:date>
    <item>
      <title>Create Empty Geometry ArcGIS 10.2</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/create-empty-geometry-arcgis-10-2/m-p/61618#M2174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to create an empty geometry on one of my Polygons I have.&lt;/P&gt;&lt;P&gt;Anyone knoes how to do this with the Field Calculator in ArcGIS 10.2?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 16:21:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/create-empty-geometry-arcgis-10-2/m-p/61618#M2174</guid>
      <dc:creator>PV</dc:creator>
      <dc:date>2015-11-23T16:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Create Empty Geometry ArcGIS 10.2</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/create-empty-geometry-arcgis-10-2/m-p/61619#M2175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not even sure updating the Shape field is supported in the Field Calculator.&amp;nbsp; I tried a few quick things and none of them worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In terms of ArcPy and cursors, the new ArcPy Data Access cursors do not support empty geometries.&amp;nbsp; If you try to insert or update an empty geometry using those cursors, it will simply get converted to a NULL value in the Shape field of the table.&amp;nbsp; Fortunately, the older/original cursors do support empty geometries.&amp;nbsp; If you select the records in the layer you want to update, the following code in the interactive Python window will&lt;/P&gt;&lt;P&gt;replace their existing geometries with empty geometries (assuming you are working with polygons).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; cur = arcpy.UpdateCursor("layer") #replace "layer" with layer name to be updated.
&amp;gt;&amp;gt;&amp;gt; for row in cur:
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue("SHAPE", arcpy.Polygon(arcpy.Array(None)))
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cur.updateRow(row)
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:20:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/create-empty-geometry-arcgis-10-2/m-p/61619#M2175</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-10T22:20:20Z</dc:date>
    </item>
  </channel>
</rss>

