<?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 Insert GEODESIC line through InsertCursor in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/insert-geodesic-line-through-insertcursor/m-p/694223#M53833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi guys,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I wrote a python script that takes in input two couples of coordinates and the generates a line feature(this line connect the points located at the coordinates of input couples)&amp;nbsp; adding it in an already existing feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically the script creates two Point Features (using gp.CreateObject("Point") and setting x and y parameters),&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;after it adds this two points in an array (using gp.CreateObject("Array")). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lastly, it creates a new row, through the method NewRow() of a previously declared InsertCursor and sets the shape attribute as the array that contains the two input Points, and then it adds the row using the InsertRow() method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I realized that in this way what the script creates it isn't a GEODESIC line.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example in the XYToLine Tool, that accomplish a similar task, the user can choose the kind of line the tool will create. Obviously I can't use this tool for my purposes&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I fix this problem?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Oct 2012 09:20:55 GMT</pubDate>
    <dc:creator>demdeberanz</dc:creator>
    <dc:date>2012-10-17T09:20:55Z</dc:date>
    <item>
      <title>Insert GEODESIC line through InsertCursor</title>
      <link>https://community.esri.com/t5/python-questions/insert-geodesic-line-through-insertcursor/m-p/694223#M53833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi guys,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I wrote a python script that takes in input two couples of coordinates and the generates a line feature(this line connect the points located at the coordinates of input couples)&amp;nbsp; adding it in an already existing feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically the script creates two Point Features (using gp.CreateObject("Point") and setting x and y parameters),&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;after it adds this two points in an array (using gp.CreateObject("Array")). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lastly, it creates a new row, through the method NewRow() of a previously declared InsertCursor and sets the shape attribute as the array that contains the two input Points, and then it adds the row using the InsertRow() method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I realized that in this way what the script creates it isn't a GEODESIC line.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example in the XYToLine Tool, that accomplish a similar task, the user can choose the kind of line the tool will create. Obviously I can't use this tool for my purposes&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I fix this problem?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 09:20:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/insert-geodesic-line-through-insertcursor/m-p/694223#M53833</guid>
      <dc:creator>demdeberanz</dc:creator>
      <dc:date>2012-10-17T09:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Insert GEODESIC line through InsertCursor</title>
      <link>https://community.esri.com/t5/python-questions/insert-geodesic-line-through-insertcursor/m-p/694224#M53834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;I realized that in this way what the script creates it isn't a GEODESIC line.&lt;BR /&gt;&lt;BR /&gt;For example in the XYToLine Tool, that accomplish a similar task, the user can choose the kind of line the tool will create. Obviously I can't use this tool for my purposes&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as I know, Python has no option to create geodesic features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But you can use workaround to use XY To Line tool. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just create empty table manually or in script with 4 fields (when in script it can be temporary in_memory table).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then use InsertCursor to populate the table with your coordinates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now you have a table with coordinates which can be an input for the tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you tried inserting a line into feature class which is in Geographic Coordinate System? Is such line non-geodesic either?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 09:48:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/insert-geodesic-line-through-insertcursor/m-p/694224#M53834</guid>
      <dc:creator>MarcinGasior</dc:creator>
      <dc:date>2012-10-17T09:48:50Z</dc:date>
    </item>
  </channel>
</rss>

