<?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 Problems constructing geometry using da.InsertCursor in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15395#M1210</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have sucessfully used the old style InsertCursor to build lots of different geometries.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But today, I decided to have a look at the new da.InsertCursor and all those "SHAPE@" tokens.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Firstly, the geometry points are coming from a table in access.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Generally each polygon has 4 records. I read these into a python dictionary of the form -&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[Key] : [(x1, y1), (x2, y2), (x3, y3), (x4, y4), (x1, y1)] ie my key is the polygon name and this points to a list of tuple pairs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that I have repeated the first coord at the end so that the polygon closes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So each of these code blocks is reading exactly the same data dictionary (PolyData).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Firstly, the old style way of doing it :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;OutCur = arcpy.InsertCursor(os.path.join(OutPath, OutPoly))&amp;nbsp; for k in PolyData: &amp;nbsp;&amp;nbsp;&amp;nbsp; v = PolyData&lt;K&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; array = arcpy.Array() &amp;nbsp;&amp;nbsp;&amp;nbsp; # print k, len(v) &amp;nbsp;&amp;nbsp;&amp;nbsp; for xy in v: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point = arcpy.Point() &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.X = xy[0] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.Y = xy[1] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array.add(point)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FcPoly = OutCur.newRow()&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FcPoly.setValue("PMLNo", k) &amp;nbsp;&amp;nbsp;&amp;nbsp; FcPoly.shape = array&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; OutCur.insertRow(FcPoly) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; del OutCur&lt;/K&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then the new da way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;OutCur = arcpy.da.InsertCursor(os.path.join(OutPath, OutPoly + "2"), ["PMLNo", "SHAPE@"])&amp;nbsp; for k in PolyData: &amp;nbsp;&amp;nbsp;&amp;nbsp; v = PolyData&lt;K&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; array = arcpy.Array() &amp;nbsp;&amp;nbsp;&amp;nbsp; # print k, len(v) &amp;nbsp;&amp;nbsp;&amp;nbsp; for xy in v: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point = arcpy.Point() &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.X = xy[0] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.Y = xy[1] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array.add(point)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; polygon = arcpy.Polygon(array) &amp;nbsp;&amp;nbsp;&amp;nbsp; data = [k, polygon] &amp;nbsp;&amp;nbsp;&amp;nbsp; OutCur.insertRow(data)&amp;nbsp; del OutCur&lt;/K&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sadly the da way gives me some decidely odd looking (and non-existant) geometries.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a look at the screen grab.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The red outlines are the output of the old way. The label in the middle is the polygon name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The green outlines are the da way output. Not only has the geometry gone from a rhomboid to a triangle, but even the corners are in a different place(?).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A bigger worry is that most of this second polygon layer has null geometry. Note the lack of other green polygons, where the red ones are.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can someone please advise me on what I am doing wrong with the da InsertCursor way of doing things.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Neil&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jan 2013 09:42:22 GMT</pubDate>
    <dc:creator>NeilAyres</dc:creator>
    <dc:date>2013-01-30T09:42:22Z</dc:date>
    <item>
      <title>Problems constructing geometry using da.InsertCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15395#M1210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have sucessfully used the old style InsertCursor to build lots of different geometries.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But today, I decided to have a look at the new da.InsertCursor and all those "SHAPE@" tokens.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Firstly, the geometry points are coming from a table in access.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Generally each polygon has 4 records. I read these into a python dictionary of the form -&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[Key] : [(x1, y1), (x2, y2), (x3, y3), (x4, y4), (x1, y1)] ie my key is the polygon name and this points to a list of tuple pairs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that I have repeated the first coord at the end so that the polygon closes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So each of these code blocks is reading exactly the same data dictionary (PolyData).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Firstly, the old style way of doing it :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;OutCur = arcpy.InsertCursor(os.path.join(OutPath, OutPoly))&amp;nbsp; for k in PolyData: &amp;nbsp;&amp;nbsp;&amp;nbsp; v = PolyData&lt;K&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; array = arcpy.Array() &amp;nbsp;&amp;nbsp;&amp;nbsp; # print k, len(v) &amp;nbsp;&amp;nbsp;&amp;nbsp; for xy in v: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point = arcpy.Point() &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.X = xy[0] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.Y = xy[1] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array.add(point)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FcPoly = OutCur.newRow()&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FcPoly.setValue("PMLNo", k) &amp;nbsp;&amp;nbsp;&amp;nbsp; FcPoly.shape = array&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; OutCur.insertRow(FcPoly) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; del OutCur&lt;/K&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then the new da way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;OutCur = arcpy.da.InsertCursor(os.path.join(OutPath, OutPoly + "2"), ["PMLNo", "SHAPE@"])&amp;nbsp; for k in PolyData: &amp;nbsp;&amp;nbsp;&amp;nbsp; v = PolyData&lt;K&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; array = arcpy.Array() &amp;nbsp;&amp;nbsp;&amp;nbsp; # print k, len(v) &amp;nbsp;&amp;nbsp;&amp;nbsp; for xy in v: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point = arcpy.Point() &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.X = xy[0] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.Y = xy[1] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array.add(point)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; polygon = arcpy.Polygon(array) &amp;nbsp;&amp;nbsp;&amp;nbsp; data = [k, polygon] &amp;nbsp;&amp;nbsp;&amp;nbsp; OutCur.insertRow(data)&amp;nbsp; del OutCur&lt;/K&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sadly the da way gives me some decidely odd looking (and non-existant) geometries.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a look at the screen grab.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The red outlines are the output of the old way. The label in the middle is the polygon name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The green outlines are the da way output. Not only has the geometry gone from a rhomboid to a triangle, but even the corners are in a different place(?).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A bigger worry is that most of this second polygon layer has null geometry. Note the lack of other green polygons, where the red ones are.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can someone please advise me on what I am doing wrong with the da InsertCursor way of doing things.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Neil&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 09:42:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15395#M1210</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2013-01-30T09:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problems constructing geometry using da.InsertCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15396#M1211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This might be an spatial resolution/XY tolerance issue where vertices are being snapped together because the are closer than the default XY tolerance of a geometry with an unknown spatial reference. Try passing in an appropriate spatial reference for the geometry when you create the Polygon:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;OutCur = arcpy.da.InsertCursor(os.path.join(OutPath, OutPoly + "2"), ["PMLNo", "SHAPE@"]) desc = arcpy.Describe(os.path.join(OutPath, OutPoly + "2")) sr = desc.spatialReference&amp;nbsp;&amp;nbsp; for k in PolyData: &amp;nbsp;&amp;nbsp;&amp;nbsp; v = PolyData&lt;K&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; array = arcpy.Array() &amp;nbsp;&amp;nbsp;&amp;nbsp; # print k, len(v) &amp;nbsp;&amp;nbsp;&amp;nbsp; for xy in v: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point = arcpy.Point() &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.X = xy[0] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.Y = xy[1] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array.add(point)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; polygon = arcpy.Polygon(array, sr) &amp;nbsp;&amp;nbsp;&amp;nbsp; data = [k, polygon] &amp;nbsp;&amp;nbsp;&amp;nbsp; OutCur.insertRow(data)&amp;nbsp; del OutCur&lt;/K&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 21:36:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15396#M1211</guid>
      <dc:creator>ChrisFox3</dc:creator>
      <dc:date>2013-01-31T21:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problems constructing geometry using da.InsertCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15397#M1212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Chris,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks. That did it. Now the output from both code blocks is exactly the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does seem odd though that the "old" way doesn't require the sr to be specifically referenced. The output, btw, is a fc inside an fd in a geodb.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps one could update the help stuff to make this more explicit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers and have a nice day and all that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Neil&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 05:01:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15397#M1212</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2013-02-01T05:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problems constructing geometry using da.InsertCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15398#M1213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Neil,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know if it is a difference in the cursors, there is a slight difference in your code other than the cursor. What if in your old code you first constructed the Polygon object and then passed that into the row? I think the issue is occuring at the time you polygon object is created.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; FcPoly.setValue("PMLNo", k)
&amp;nbsp;&amp;nbsp;&amp;nbsp; polygon = arcpy.Polygon(array)
&amp;nbsp;&amp;nbsp;&amp;nbsp; FcPoly.shape = polygon
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:37:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15398#M1213</guid>
      <dc:creator>ChrisFox3</dc:creator>
      <dc:date>2021-12-10T20:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problems constructing geometry using da.InsertCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15399#M1214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Chris,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am creating geometries using the data access module similarly but I see strange performance. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first time I created the tool from the script that reads xy from one shapefile and inserts to another. When tested with 2000 points it was completed a second. Then I started testing with other shapefiles and changed the geometry source from shapefile to Access database table. Now the tool takes 13 seconds with even lesser number of points. I retested with the original shapefile, still slow performance. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am deleting the cursors at the end of the Execution. Is there anything else I need to clear ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Appreciate your help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 17:57:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15399#M1214</guid>
      <dc:creator>jp</dc:creator>
      <dc:date>2013-02-01T17:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problems constructing geometry using da.InsertCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15400#M1215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Chris,&lt;BR /&gt;&lt;BR /&gt;I am creating geometries using the data access module similarly but I see strange performance. &lt;BR /&gt;&lt;BR /&gt;The first time I created the tool from the script that reads xy from one shapefile and inserts to another. When tested with 2000 points it was completed a second. Then I started testing with other shapefiles and changed the geometry source from shapefile to Access database table. Now the tool takes 13 seconds with even lesser number of points. I retested with the original shapefile, still slow performance. &lt;BR /&gt;&lt;BR /&gt;I am deleting the cursors at the end of the Execution. Is there anything else I need to clear ?&lt;BR /&gt;&lt;BR /&gt;Appreciate your help!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not sure why you are seeing a difference in performance. You might want to contact support to try to troubleshoot this issue further.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2013 21:04:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15400#M1215</guid>
      <dc:creator>ChrisFox3</dc:creator>
      <dc:date>2013-02-04T21:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problems constructing geometry using da.InsertCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15401#M1216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Chris,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;regardless of the slight difference in code, the "old" way has worked for ages.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The InsertCursor is pointing at a newly created Fc inside a Fd, so seems carry with it all those good things defined by the Fd.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These polygons are being created in a GCS and are quite small. About 800m by 300m in UTM projected space. Approx 0.007 of a degree and less. So, you were correct that some rounding / resolution issue was the problem with the da.InsertCursor way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Its just that the da.InsertCursor isn't "aware" of the spatial resolution / crs of the feature it is inserting into. The old InsertCursor plainly was!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;N&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 03:43:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15401#M1216</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2013-02-06T03:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problems constructing geometry using da.InsertCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15402#M1217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Chris,&lt;BR /&gt;regardless of the slight difference in code, the "old" way has worked for ages.&lt;BR /&gt;The InsertCursor is pointing at a newly created Fc inside a Fd, so seems carry with it all those good things defined by the Fd.&lt;BR /&gt;&lt;BR /&gt;These polygons are being created in a GCS and are quite small. About 800m by 300m in UTM projected space. Approx 0.007 of a degree and less. So, you were correct that some rounding / resolution issue was the problem with the da.InsertCursor way.&lt;BR /&gt;&lt;BR /&gt;Its just that the da.InsertCursor isn't "aware" of the spatial resolution / crs of the feature it is inserting into. The old InsertCursor plainly was!&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;N&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Neil, I guess what I am trying to say is the rounding occurs at this line in the code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;polygon = arcpy.Polygon(array)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you were to inspect the geometry of the polygon object you would find this to be the case. It is not the cursor that is rounding the geometry. When you use the insert cursor you are just adding the already rounded geometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In your old code you never create a polygon object:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FcPoly = OutCur.newRow()

&amp;nbsp;&amp;nbsp;&amp;nbsp; FcPoly.setValue("PMLNo", k)
&amp;nbsp;&amp;nbsp;&amp;nbsp; FcPoly.shape = array&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You just pass in the array of point objects into the Shape field of the row, at this point the polygon is constructed and it takes on the spatial reference defined by the feature class. If you were to construct the polygon object from the array before passing it into the Shape field you would see the same problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:37:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15402#M1217</guid>
      <dc:creator>ChrisFox3</dc:creator>
      <dc:date>2021-12-10T20:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problems constructing geometry using da.InsertCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15403#M1218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Chris,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Okay, I think I get it. I now understand what you were pointing out. Obvious really.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So the "Polygon" build has no prior knowledge of what these coordinates represent, and uses some default resolutions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for all your hard work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;N&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 16:58:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-constructing-geometry-using-da/m-p/15403#M1218</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2013-02-07T16:58:15Z</dc:date>
    </item>
  </channel>
</rss>

