<?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: Null/Empty Geometry in Python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162509#M12462</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried Shape@XY, it will successfully read each line of the feature,&lt;/P&gt;&lt;P&gt;but it is still unable to assign the coordinate to it. When I use calculate&lt;/P&gt;&lt;P&gt;geometry manually in ArcMap it will assign it to them, so it does exist&lt;/P&gt;&lt;P&gt;somewhere, but unfortunately Shape@ does not pick them up. thank you though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Aug 2016 19:54:16 GMT</pubDate>
    <dc:creator>LeeGodfrey1</dc:creator>
    <dc:date>2016-08-17T19:54:16Z</dc:date>
    <item>
      <title>Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162495#M12448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a series of Feature Classes ( Polyline/arc type) that have no Geometry associated with them. They have been converted through multiple different systems ( Mid Miff, Cable Cad ( custom viewer) and now GDB)&amp;nbsp; and it was lost along the way. This is just part of the process unfortunately, and has been identified with this old set of data for years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I load the feature class into ArcMap and zoom to layer, nothing is visible, they have shape length of zero, going to individual ones displays nothing, as expected of having no Geometry and no shape length. &lt;BR /&gt;However, I can add a Double field for XCoord and YCoord, and using Calculate Geometry I can get the coordinate values for the midpoint of the line. Which allows me to then export the data out to a table, and then using display XY Coordinates I can see the locations with the associated attributes. This is the end goal of what I want, and manually in ArcMap it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My issues is that I have hundreds of these, and I am attempting to automate the process using Python.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attempted to get midpoint using: Midpoint = Feature.shape.positionAlongLine(0.50,True).firstPoint&amp;nbsp;&amp;nbsp;&amp;nbsp; however this does not work because it states that I have Null or Empty geometry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below works, in that it will at least read the features, but it still returns values of None for the coordinates ( even though when I manually try in ArcMap I get values)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fields = ["&lt;A href="mailto:SHAPE@XY%22,%22X%22,%22Y"&gt;&lt;SPAN style="color: #0066cc; text-decoration: underline;"&gt;SHAPE@XY","X","Y&lt;/SPAN&gt;&lt;/A&gt;"]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with&amp;nbsp; arcpy.da.UpdateCursor(path,fields) as cursor:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x,y = row[0]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("{},{}".format(x,y))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[1] = x&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[2] = y&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am wondering if anyone has had any success with dealing with Null/Empty Geometries in Python coding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you anyone for your assistance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a sample of the data below in a zipped GDB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2016 14:05:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162495#M12448</guid>
      <dc:creator>LeeGodfrey1</dc:creator>
      <dc:date>2016-08-16T14:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162496#M12449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try Shape@ if they are polyline or polygons (and I think even points), the centroid of the geometry will be returned IF it can be returned&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2016 14:26:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162496#M12449</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-08-16T14:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162497#M12450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lee,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried the add &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/add-xy-coordinates.htm"&gt;XY Coordinates&lt;/A&gt; tool?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2016 14:50:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162497#M12450</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2016-08-16T14:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162498#M12451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case that you select a feature (from the attribute table) and you can zoom at, and it shows the selection in the map, but not the feature itself, you may want to check if the Spatial Index is valid. At least this has happened to me, when using an Enterprise geodatabase (Oracle in this case).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to attache a small sample of the data to run some tests?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2016 15:17:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162498#M12451</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2016-08-16T15:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162499#M12452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you try to &lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/check-geometry.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/check-geometry.htm"&gt;Check Geometry—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&amp;nbsp; and then &lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/repair-geometry.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/repair-geometry.htm"&gt;Repair Geometry—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&amp;nbsp; (on a copy of course)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;re you code above.... the print statements shouldn't be indented&amp;nbsp; (see &lt;A href="https://community.esri.com/people/curtvprice/blog/2014/09/25/posting-code-blocks-in-the-new-geonet?sr=search&amp;amp;searchId=6f8262c1-3ab6-452d-a2ed-af85b1a375e7&amp;amp;searchIndex=1"&gt;https://community.esri.com/people/curtvprice/blog/2014/09/25/posting-code-blocks-in-the-new-geonet?sr=search&amp;amp;searchId=6f8262c1-3ab6-452d-a2ed-af85b1a375e7&amp;amp;searchIndex=1&lt;/A&gt;‌&amp;nbsp; although I think it changed with the friday update... and you can do it from the ...More on the toolbars of every window)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are other things you can try including &lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/feature-vertices-to-points.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/feature-vertices-to-points.htm"&gt;Feature Vertices To Points—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp; (and others in that section)...depending on what you final goal is.&amp;nbsp; There are code samples for each.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2016 15:45:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162499#M12452</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-08-16T15:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162500#M12453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Xander, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did some checks with spatial index in trying to validate it but had no changes. I have attached a GDB that is some of the original data that I haven't done any tests on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Lee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2016 17:09:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162500#M12453</guid>
      <dc:creator>LeeGodfrey1</dc:creator>
      <dc:date>2016-08-16T17:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162501#M12454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cursor = arcpy.SearchCursor(path)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row = Cursor.next()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while row:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Midpoint = row.shape.positionAlongLine(0.50,True).firstPoint&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print Midpoint.X&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print Midpoint.Y&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row = Cursor.next()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This section of code ended up working, it was brought forward by a co-worker. I had thought I'd used it before but apparently I did not. Thank you all for responses. The answer was in my commented out in my code all along, and was pretty simple.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2016 17:25:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162501#M12454</guid>
      <dc:creator>LeeGodfrey1</dc:creator>
      <dc:date>2016-08-16T17:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162502#M12455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just started an edit session and I notice that the geometries I have tested consist of two points and have the same start and end point:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/216590_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That yields the SHAPE_Length is 0 and in some&amp;nbsp;operations the geometry will not be considered valid.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I run this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'D:\Xander\GeoNet\XYvalues\gdb\ESRIForumSampleDataSet_Lee.gdb\POLE_arc'&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SearchCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'SHAPE@'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; curs&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; curs&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyline &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; polyline&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;firstPoint&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;X&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; polyline&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;firstPoint&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Y&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; polyline&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;lastPoint&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;X&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; polyline&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;lastPoint&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Y&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; polyline&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will yield, X and Y of the firstPoint, X and Y of the lastPoint and the length of the line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;272575.775391 741323.871826 272575.775391 741323.871826 0.0
272542.675415 741357.241821 272542.675415 741357.241821 0.0
272536.0354 741340.311829 272536.0354 741340.311829 0.0
272460.255432 741441.681824 272460.255432 741441.681824 0.0
272364.155396 741540.721802 272364.155396 741540.721802 0.0
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see start and end are the same and the length is 0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:31:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162502#M12455</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-11T08:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162503#M12456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds to me like those are points...not lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same start/end with length..poly.&amp;nbsp;&amp;nbsp;&amp;nbsp; Same start/end no length...point.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; From my coverage "&lt;EM&gt;daze&lt;/EM&gt;"&amp;nbsp;&amp;nbsp; &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2016 20:51:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162503#M12456</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-08-16T20:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162504#M12457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The data has definitely been mangled along the way.&amp;nbsp; When digging through the sample data, you appear to have 2 different types of corruption occurring.&amp;nbsp; Looking at the JSON representations for OID 1 and 10, respectively:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;{"curvePaths":[[[272575.775390625,741323.87182617187],{"a":[[272575.775390625,741323.87182617187],[272575.20600000001,741323.30700000003],1,1,1.5707963267948966,0.802018882730549,0.99999999996371092]}]],"spatialReference":{"wkid":2200,"latestWkid":2200}}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;{"curvePaths":[[[274805.416015625,743884.35400390625],[274805.416015625,743884.35400390625]]],"spatialReference":{"wkid":2200,"latestWkid":2200}}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For OID 1, which represents the vast majority of data in the sample data set, the geometry is effectively a circle that is being represented by a corrupted ellipse (See &lt;A href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geometry_Objects/02r3000000n1000000" rel="nofollow noopener noreferrer" target="_blank"&gt;JSON curve object &lt;/A&gt;of the ArcGIS REST API). &amp;nbsp;Changing the arc reference from minor (1) to major (0) will create a valid circular ellipse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For OID 10, which represents roughly &amp;lt;10% of the sample data, the geometry is much more corrupted.&amp;nbsp; There are fragments of either a circle or ellipse, but not enough to generate a valid geometry without making some assumptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code goes through the sample dataset and updates the geometries represented by OID 1:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; json
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; cur &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"POLE_arc"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"OID@"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"SHAPE@"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; oid&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; shape &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cur&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape_dict &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; json&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;loads&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;shape&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;JSON&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape_dict&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"curvePaths"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"a"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AsShape&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;json&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dumps&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;shape_dict&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cur&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;oid&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; shape&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;except&lt;/SPAN&gt; Exception &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; e&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"OID {} can't be updated"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;oid&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the geometries represented by OID 10, the best you can do is turn them into a point.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:31:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162504#M12457</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T08:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162505#M12458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you make an assumption that the exceptions (those like OID 10) are circles with a&amp;nbsp;similar diameter, rotation, etc. and update the geometry, instead of converting them to points?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2016 04:28:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162505#M12458</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2016-08-17T04:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162506#M12459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's great, thank you. I hadn't thought to look for just the first point in the line as all the other work in these datasets was set for the midpoint. Very helpful &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2016 12:11:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162506#M12459</guid>
      <dc:creator>LeeGodfrey1</dc:creator>
      <dc:date>2016-08-17T12:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162507#M12460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, one could do that.&amp;nbsp; Looking over all of the recovered circles/ellipses, the diameters all seem very close to each other, so I think a fairly reasonable and accurate assumption could be made.&amp;nbsp; &lt;SPAN style="text-decoration: line-through;"&gt;I will update my original code when I can find the time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPDATE&lt;/STRONG&gt;:&amp;nbsp; Updated/complete code provided subsequently by &lt;A href="https://community.esri.com/people/rvburton"&gt;rvburton&lt;/A&gt;‌.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2016 14:14:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162507#M12460</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-08-17T14:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162508#M12461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried Add XY Coordinates, it does not work because they are&lt;/P&gt;&lt;P&gt;polylines unfortunately. Thank you though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2016 19:35:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162508#M12461</guid>
      <dc:creator>LeeGodfrey1</dc:creator>
      <dc:date>2016-08-17T19:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162509#M12462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried Shape@XY, it will successfully read each line of the feature,&lt;/P&gt;&lt;P&gt;but it is still unable to assign the coordinate to it. When I use calculate&lt;/P&gt;&lt;P&gt;geometry manually in ArcMap it will assign it to them, so it does exist&lt;/P&gt;&lt;P&gt;somewhere, but unfortunately Shape@ does not pick them up. thank you though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2016 19:54:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162509#M12462</guid>
      <dc:creator>LeeGodfrey1</dc:creator>
      <dc:date>2016-08-17T19:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162510#M12463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This builds on Joshua Bixby's comments and proposed solution.&amp;nbsp; It assumes there are only 2 different types of corruption in your data - either the curve object has invalid data or the curve object is basically missing. Joshua's code fixes those features where the curve has invalid data.&amp;nbsp; In the exception block, this code creates a curve object using the assumption that the curves are circles similar to all the others.&amp;nbsp; This worked with the sample dataset.&amp;nbsp; If there are additional types of corruption in the full dataset, you may need to modify the exception code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This solution requires 10.3 or higher.&amp;nbsp; Load the feature in ArcMap and run the following code in the Python window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; json
cur &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"POLE_arc"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"OID@"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"SHAPE@"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; oid&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; shape &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cur&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; shape_dict &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; json&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;loads&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;shape&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;JSON&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape_dict&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"curvePaths"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"a"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AsShape&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;json&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dumps&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;shape_dict&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cur&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;oid&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; shape&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;except&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; shape_dict&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"curvePaths"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; shape_dict&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"curvePaths"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; x1 &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0.544675488298497&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; y1 &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0.540181258002587&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape_dict&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"curvePaths"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"a"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;x1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;y1&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;x2&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;y2&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1.57079632679&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0.80206559811&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0.999999999964&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AsShape&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;json&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dumps&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;shape_dict&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cur&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;oid&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; shape&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And a thank you to Joshua.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:32:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162510#M12463</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-11T08:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162511#M12464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi @Randy&lt;/P&gt;&lt;P&gt;I am having a similar problem, I would be glad if you help.&lt;/P&gt;&lt;P&gt;I need to delete these empty geometry data,&lt;/P&gt;&lt;P&gt;I was doing synchronization operations with the task scheduler, I created 5 replicas, 2 of them were created geometric notwork.&lt;BR /&gt;Synchronization fails because the geometric network does not accept empty or null geometry data.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;How can I delete this data with python without opening arcmp with the data that is empty geometry?&lt;/P&gt;&lt;P&gt;this way I prepared python code.&lt;BR /&gt;The code does not work in the synchronization section when there is an empty geometry.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My goal is to do the synchronization process with python every day automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;BR /&gt;# Set the necessary product code&lt;BR /&gt;import arceditor&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Import arcpy module&lt;BR /&gt;import arcpy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v172_16_200_86_GIS_sde__5_ = "Database Connections\\172.16.200.86_GIS.sde"&lt;BR /&gt;v172_16_200_86_GIS_sde__6_ = v172_16_200_86_GIS_sde__5_&lt;BR /&gt;v172_16_200_86_GIS_NETWORK_sde__2_ = v172_16_200_86_GIS_sde__5_&lt;BR /&gt;v172_16_200_86_GIS_NETWORK_sde = "Database Connections\\172.16.200.86_GIS_NETWORK.sde"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.SynchronizeChanges_management(v172_16_200_86_GIS_sde__5_, "PE_Hat_09082018", v172_16_200_86_GIS_NETWORK_sde, "FROM_GEODATABASE1_TO_2", "IN_FAVOR_OF_GDB1", "BY_OBJECT", "DO_NOT_RECONCILE")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.Compress_management(v172_16_200_86_GIS_GISdbsa_sde)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.DisconnectUser('Database Connections\\172.16.200.86_GIS_GISdbsa.sde', "ALL")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.AcceptConnections('Database Connections\\172.16.200.86_GIS_GISdbsa.sde', True)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2018 06:19:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162511#M12464</guid>
      <dc:creator>GIS_Solutions</dc:creator>
      <dc:date>2018-11-09T06:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162512#M12465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fortunately for you, the ArcPy Data Access cursors return Python &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;None&lt;/SPAN&gt; whether there is an empty geometry or the field is NULL (empty geometry and NULL are not the same, but the ArcPy DA cursors treat them the same).&amp;nbsp; Something like the following code will remove all rows where the cursor returns a &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;None&lt;/SPAN&gt;.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# path to feature class&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"SHAPE@"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cur&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; shp&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cur&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; shp &lt;SPAN class="keyword token"&gt;is&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cur&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;deleteRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:32:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162512#M12465</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T08:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Null/Empty Geometry in Python</title>
      <link>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162513#M12466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much&lt;/P&gt;&lt;P&gt;This code works well, but it gives error when there are users. I'm throwing users like this &lt;STRONG&gt;(arcpy.DisconnectUser('Database Connections\\172.16.200.86_CBS_cbsdbsa.sde', "ALL"))&lt;/STRONG&gt; can't access the code at this time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do this after killing users?&lt;/P&gt;&lt;P&gt;@&lt;A _jive_internal="true" class="" data-userid="3420" data-username="bixb0012" href="https://community.esri.com/people/bixb0012" style="color: #8ca9cd; background-color: #ffffff; border: 0px; font-weight: 200; text-decoration: none; font-size: 1.286rem;"&gt;Joshua Bixby&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/429599_open.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/429583_Disconnect.jpg" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2018 07:32:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/null-empty-geometry-in-python/m-p/162513#M12466</guid>
      <dc:creator>GIS_Solutions</dc:creator>
      <dc:date>2018-11-15T07:32:59Z</dc:date>
    </item>
  </channel>
</rss>

