songissimo

Insert GEODESIC line through InsertCursor

Discussion created by songissimo on Oct 17, 2012
Latest reply on Oct 17, 2012 by m.gasior
Hi guys,
   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)  adding it in an already existing feature class.
Basically the script creates two Point Features (using gp.CreateObject("Point") and setting x and y parameters),

after it adds this two points in an array (using gp.CreateObject("Array")).

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.

I realized that in this way what the script creates it isn't a GEODESIC line.

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


How can I fix this problem?

Outcomes