<?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 Support Empty Geometries with ArcPy Geometry Class Constructors in Data Management Ideas</title>
    <link>https://community.esri.com/t5/data-management-ideas/support-empty-geometries-with-arcpy-geometry-class/idi-p/924192</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;Constructing empty geometries isn't possible using the ArcPy Geometry classes. The only way to currently create an empty geometry in ArcPy is to use the arcpy.FromWKT as a geometry constructor. I propose the ArcPy Geometry classes support the construction of empty geometries.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;Currently, calling any of the ArcPy Geometry constructors with no arguments, a 'None' argument, or an empty arcpy.Array throws an exception.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.Polygon()
Runtime error 
Traceback (most recent call last):
  File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\arcobjects\mixins.py", line 222, in __init__
    *gp_fixargs(args, True))
  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py", line 504, in &amp;lt;lambda&amp;gt;
    return lambda *args: val(*gp_fixargs(args, True))
RuntimeError: Object: CreateObject cannot create geometry from inputs&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;Instead, the constructors should generate an empty geometry of the appropriate type similar to geometry constructors from other Python (Shapely) and DBMS (SQL Server) packages.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; pg = arcpy.Polygon()
&amp;gt;&amp;gt;&amp;gt; pg.type
u'polygon'
&amp;gt;&amp;gt;&amp;gt; pg.WKT
u'MULTIPOLYGON EMPTY'&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;!--   content transformation source ID: 087E0000000CxH1   --&gt;</description>
    <pubDate>Wed, 05 Oct 2022 23:53:06 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2022-10-05T23:53:06Z</dc:date>
    <item>
      <title>Support Empty Geometries with ArcPy Geometry Class Constructors</title>
      <link>https://community.esri.com/t5/data-management-ideas/support-empty-geometries-with-arcpy-geometry-class/idi-p/924192</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;Constructing empty geometries isn't possible using the ArcPy Geometry classes. The only way to currently create an empty geometry in ArcPy is to use the arcpy.FromWKT as a geometry constructor. I propose the ArcPy Geometry classes support the construction of empty geometries.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;Currently, calling any of the ArcPy Geometry constructors with no arguments, a 'None' argument, or an empty arcpy.Array throws an exception.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.Polygon()
Runtime error 
Traceback (most recent call last):
  File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\arcobjects\mixins.py", line 222, in __init__
    *gp_fixargs(args, True))
  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py", line 504, in &amp;lt;lambda&amp;gt;
    return lambda *args: val(*gp_fixargs(args, True))
RuntimeError: Object: CreateObject cannot create geometry from inputs&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;Instead, the constructors should generate an empty geometry of the appropriate type similar to geometry constructors from other Python (Shapely) and DBMS (SQL Server) packages.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; pg = arcpy.Polygon()
&amp;gt;&amp;gt;&amp;gt; pg.type
u'polygon'
&amp;gt;&amp;gt;&amp;gt; pg.WKT
u'MULTIPOLYGON EMPTY'&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;!--   content transformation source ID: 087E0000000CxH1   --&gt;</description>
      <pubDate>Wed, 05 Oct 2022 23:53:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-ideas/support-empty-geometries-with-arcpy-geometry-class/idi-p/924192</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2022-10-05T23:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: Support Empty Geometries with ArcPy Geometry Class Constructors</title>
      <link>https://community.esri.com/t5/data-management-ideas/support-empty-geometries-with-arcpy-geometry-class/idc-p/924193#M246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;When I saw your idea I thought surely that's not right but having looked at the help file I realised there is no mechanism or &lt;I&gt;method&lt;/I&gt; that allows you to add points to a polygon. In ArcObjects there is an interface called IPointsCollection and you would use that to insert points into a geometry. So as there is no way of adding points to an existing polygon its not suprising that the constructor won't allow the creation of a Polygon without an array of points. So I'm guessing until ESRI expose some method to add points to a polygon this idea will never get of the ground...&lt;BR /&gt;&lt;BR /&gt;Still voted for it!

&lt;!-- content transformation source ID: 00aE000000BbdNy --&gt;

&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 11:54:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-ideas/support-empty-geometries-with-arcpy-geometry-class/idc-p/924193#M246</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2015-04-22T11:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Support Empty Geometries with ArcPy Geometry Class Constructors</title>
      <link>https://community.esri.com/t5/data-management-ideas/support-empty-geometries-with-arcpy-geometry-class/idc-p/924194#M247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Can create an empty polygon this way:&lt;BR /&gt;&lt;SPAN style="font-size: 11pt;"&gt;&lt;SPAN style="font-family: calibri,sans-serif;"&gt;&lt;SPAN style="color: rgb(31, 73, 125);"&gt;p = arcpy.Polygon(arcpy.Array(None))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;

&lt;!-- content transformation source ID: 00aE000000BblX2 --&gt;

&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 20:48:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-ideas/support-empty-geometries-with-arcpy-geometry-class/idc-p/924194#M247</guid>
      <dc:creator>DavidWynne</dc:creator>
      <dc:date>2015-04-22T20:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Support Empty Geometries with ArcPy Geometry Class Constructors</title>
      <link>https://community.esri.com/t5/data-management-ideas/support-empty-geometries-with-arcpy-geometry-class/idc-p/924195#M248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Ha! I had tried the following and had come to the conclusion it was not possible as this throws an error:&lt;BR /&gt;&lt;BR /&gt;p = arcpy.Polygon(arcpy.Array([]))&lt;BR /&gt;&lt;BR /&gt;Nice to see it's possible.&lt;BR /&gt;&amp;nbsp;

&lt;!-- content transformation source ID: 00aE000000Bbomj --&gt;

&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 13:36:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-ideas/support-empty-geometries-with-arcpy-geometry-class/idc-p/924195#M248</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2015-04-23T13:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Support Empty Geometries with ArcPy Geometry Class Constructors</title>
      <link>https://community.esri.com/t5/data-management-ideas/support-empty-geometries-with-arcpy-geometry-class/idc-p/924196#M249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Funny, I tried None, arcpy.Array(), and arcpy.Array([]); but I never thought to try arcpy.Array(None).&amp;nbsp; That said, arcpy.Polygon(arcpy.Array(None)) is a bit too baroque for my tastes.&amp;nbsp; In the context of Zen, there is nothing simple or beautiful about the current implementation.&amp;nbsp; What is problematic with arcpy.Polygon()?&lt;BR /&gt;&lt;BR /&gt;I will leave this idea open to push for a more elegant and straightfoward way to construct empty geometries.

&lt;!-- content transformation source ID: 00aE000000BcMKa --&gt;

&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 22:37:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-ideas/support-empty-geometries-with-arcpy-geometry-class/idc-p/924196#M249</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-04-27T22:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Support Empty Geometries with ArcPy Geometry Class Constructors</title>
      <link>https://community.esri.com/t5/data-management-ideas/support-empty-geometries-with-arcpy-geometry-class/idc-p/924197#M250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Given empty geometries are actually/already supported by the geometry constructors, I think this idea should be merged with &lt;A href="https://community.esri.com/ideas/10963" target="_blank"&gt;https://community.esri.com/ideas/10963&lt;/A&gt;‌ since what I am after is having the syntax for creating empty geometries be more intuitive and idiomatic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jun 2021 08:54:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-ideas/support-empty-geometries-with-arcpy-geometry-class/idc-p/924197#M250</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-06-22T08:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Support Empty Geometries with ArcPy Geometry Class Constructors - Status changed to: Closed</title>
      <link>https://community.esri.com/t5/data-management-ideas/support-empty-geometries-with-arcpy-geometry-class/idc-p/1212150#M1952</link>
      <description>&lt;P&gt;This Idea has been closed as a duplicate of an idea found on the ArcGIS Pro Ideas Exchange.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If you would like to support this idea. Please comment and send your kudos to the idea linked below.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/pythonic-arcpy-geometries/idi-p/940322" target="_blank"&gt;https://community.esri.com/t5/arcgis-pro-ideas/pythonic-arcpy-geometries/idi-p/940322&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 19:42:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-ideas/support-empty-geometries-with-arcpy-geometry-class/idc-p/1212150#M1952</guid>
      <dc:creator>SSWoodward</dc:creator>
      <dc:date>2022-09-13T19:42:47Z</dc:date>
    </item>
  </channel>
</rss>

