<?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: Why firstPoint and lastPoint does not match? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421866#M33153</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I thinked something similar … but I always thinked that all spatial information was inside the SHAPE field and replacing it with a new geometry all should be fine.&lt;/P&gt;&lt;P&gt;Anyway Tahnk you again. I should be more&amp;nbsp; carefull&amp;nbsp; in using cursors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Sep 2018 14:10:44 GMT</pubDate>
    <dc:creator>ValerioLuzzi1</dc:creator>
    <dc:date>2018-09-20T14:10:44Z</dc:date>
    <item>
      <title>Why firstPoint and lastPoint does not match?</title>
      <link>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421859#M33146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV style="color: #000000; background-color: #ffffff; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;DIV style="background-color: #ffffff; font-weight: normal;"&gt;&lt;DIV&gt;&lt;SPAN&gt;SR &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; arcpy.Describe(linepathname).spatialReference&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;polyline &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; arcpy.AsShape(&lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff;"&gt;"""{"paths":[[[686187.19259999972,4929374.2093000002],[686221.91579999961,4929363.8212000001],[686224.60580000002,4929363.6297999993],[686227.87069999985,4929364.5913999993],[686230.85759999976,4929365.9749999996]]],"spatialReference":{"wkid":25832,"latestWkid":25832}}"""&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;True&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;#segment &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; arcpy.Polyline(arcpy.Array([polyline.firstPoint,polyline.lastPoint]),SR)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;DIV style="background-color: #ffffff; font-weight: normal;"&gt;&lt;DIV&gt;&lt;SPAN&gt;segment &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; arcpy.AsShape(&lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff;"&gt;"""{"paths":[[[686187.19259999972,4929374.2093000002],[686230.85759999976,4929365.9749999996]]],"spatialReference":{"wkid":25832,"latestWkid":25832}}"""&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;I have tried to create a simple line that join the first point and the last point of the polyline but the render on the map is wrong (see the Image).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;I have an offset and I cant figure the problem.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;(The spatial reference it's the same)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;Anyone can give me some suggestion?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2018 12:52:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421859#M33146</guid>
      <dc:creator>ValerioLuzzi1</dc:creator>
      <dc:date>2018-09-19T12:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why firstPoint and lastPoint does not match?</title>
      <link>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421860#M33147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using this code:&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; polyline &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;&lt;SPAN class="string token"&gt;"""{"paths":[[[686187.19259999972,4929374.2093000002],[686221.91579999961,4929363.8212000001],[686224.60580000002,4929363.6297999993],[686227.87069999985,4929364.5913999993],[686230.85759999976,4929365.9749999996]]],"spatialReference":{"wkid":25832,"latestWkid":25832}}"""&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="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CopyFeatures_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polyline&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"in_memory\polyline"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Result &lt;SPAN class="string token"&gt;'in_memory\\polyline'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;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="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; segment &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;&lt;SPAN class="string token"&gt;"""{"paths":[[[686187.19259999972,4929374.2093000002],[686230.85759999976,4929365.9749999996]]],"spatialReference":{"wkid":25832,"latestWkid":25832}}"""&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="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CopyFeatures_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;segment&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"in_memory\segment"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Result &lt;SPAN class="string token"&gt;'in_memory\\segment'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;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="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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="segment connecting 2 ends of polyline" class="image-1 jive-image" height="379" src="https://community.esri.com/legacyfs/online/422397_polyline_segment.png" width="496" /&gt;&lt;/P&gt;&lt;P&gt;What version of ArcGIS are you using?&amp;nbsp; I am using ArcMap 10.6.1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:03:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421860#M33147</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T19:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Why firstPoint and lastPoint does not match?</title>
      <link>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421861#M33148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV style="color: #000000; background-color: #ffffff; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre;"&gt;&lt;DIV&gt;&lt;DIV style="color: #000000; background-color: #ffffff; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre;"&gt;&lt;DIV&gt;My version is 10.4 but I think this cannot be the problem. I tried your code and all seems ok also for me,&lt;/DIV&gt;&lt;DIV&gt;so the problem is not here.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;This code should duplicate a record and change the shape with the segment but here you should see the trouble.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;outpathname = "in_memory\polyline"&lt;BR /&gt;polyline = arcpy.AsShape("""{"paths":[[[686187.19259999972,4929374.2093000002],[686221.91579999961,4929363.8212000001],[686224.60580000002,4929363.6297999993],[686227.87069999985,4929364.5913999993],[686230.85759999976,4929365.9749999996]]],"spatialReference":{"wkid":25832,"latestWkid":25832}}""", True)&lt;BR /&gt;arcpy.CopyFeatures_management(polyline,outpathname)&lt;BR /&gt;SR = arcpy.Describe(outpathname).spatialReference&lt;BR /&gt;with arcpy.da.SearchCursor(outpathname, ['SHAPE@','*'] ) as cursor:&lt;BR /&gt;&amp;nbsp;with arcpy.da.InsertCursor(outpathname, ['SHAPE@','*'] ) as icur:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;for row in cursor:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;polyline = row[0]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;#print polyline&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;segment = arcpy.Polyline(arcpy.Array([polyline.firstPoint,polyline.lastPoint]),SR)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;row = list(row)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;row[0] = segment&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;icur.insertRow(row)&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Please give me a feedbak. Thank you!&lt;/DIV&gt;&lt;DIV&gt;&lt;IMG src="data:image/png;base64,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" /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2018 20:44:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421861#M33148</guid>
      <dc:creator>ValerioLuzzi1</dc:creator>
      <dc:date>2018-09-19T20:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Why firstPoint and lastPoint does not match?</title>
      <link>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421862#M33149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you print `polyline`, it shows the correct coordinates? And, CRS is defined in the output feature class (just verify that it actually gets set in the feature class)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2018 23:38:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421862#M33149</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2018-09-19T23:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why firstPoint and lastPoint does not match?</title>
      <link>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421863#M33150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nesting an insert cursor within a search cursor on the same feature class or table seems ripe for problems.&amp;nbsp; That said, it isn't the cause of the issue you are seeing.&amp;nbsp; Try the following code:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;outpathname &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"in_memory\polyline"&lt;/SPAN&gt;
polyline &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;&lt;SPAN class="string token"&gt;"""{"paths":[[[686187.19259999972,4929374.2093000002],[686221.91579999961,4929363.8212000001],[686224.60580000002,4929363.6297999993],[686227.87069999985,4929364.5913999993],[686230.85759999976,4929365.9749999996]]],"spatialReference":{"wkid":25832,"latestWkid":25832}}"""&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;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CopyFeatures_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polyline&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;outpathname&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
SR &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Describe&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;outpathname&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference
&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;outpathname&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="string 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="keyword token"&gt;as&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&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;InsertCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;outpathname&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; icur&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&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; &lt;SPAN class="comment token"&gt;#print polyline&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; segment &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Polyline&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Array&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&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;polyline&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;lastPoint&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;SR&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; icur&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;insertRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;segment&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:04:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421863#M33150</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T19:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why firstPoint and lastPoint does not match?</title>
      <link>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421864#M33151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes!, it works! Thank you.&lt;/P&gt;&lt;P&gt;The problem is probably hidden in nested cursors. I also solved with a workaround. First duplicating records and after with a (not nested ) UpdateCursor updating the geometry, but your solution is more compact and I think I will use it.&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2018 13:46:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421864#M33151</guid>
      <dc:creator>ValerioLuzzi1</dc:creator>
      <dc:date>2018-09-20T13:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why firstPoint and lastPoint does not match?</title>
      <link>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421865#M33152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the issue here is that you were passing conflicting geometry data to the insert cursor.&amp;nbsp; Since you used ["SHAPE@", "*"] for the fields, you were returning both a geometry object as well as a tuple of the shape's centroid x,y coordinates.&amp;nbsp; When you went to insert the record, you passed a new geometry object but with the same tuple containing the previous geometry centroid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2018 13:52:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421865#M33152</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-09-20T13:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why firstPoint and lastPoint does not match?</title>
      <link>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421866#M33153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I thinked something similar … but I always thinked that all spatial information was inside the SHAPE field and replacing it with a new geometry all should be fine.&lt;/P&gt;&lt;P&gt;Anyway Tahnk you again. I should be more&amp;nbsp; carefull&amp;nbsp; in using cursors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2018 14:10:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-firstpoint-and-lastpoint-does-not-match/m-p/421866#M33153</guid>
      <dc:creator>ValerioLuzzi1</dc:creator>
      <dc:date>2018-09-20T14:10:44Z</dc:date>
    </item>
  </channel>
</rss>

