Andik

Creating Polylines with Z-values very slow

Discussion created by Andik on Jul 17, 2013
Latest reply on Dec 6, 2013 by kvolleberg
Hi,

i am creating Polylines from scrath out of X,Y,Z-Points.

I need PolylineZ. When I create Polylines using arcpy.Polyline i use the Parameter "has_z = True".

If i use this Parameter, i get PolylineZ but it works that slow that the script is un-useable for me.

Without this paramater the script works fine and fast but without having Z-values.


How can i make the script faster? Has someone an idea?

Thanks.
Andy



lineArray = arcpy.Array()
pnt = arcpy.Point()

for f in list:
pnt.X = ...
pnt.Y = ...
pnt.Z = ...
lineArray.add(pnt)
feature = arcpy.Polyline(lineArray, "None", True, False)
featureList.append(feature)
lineArray.removeAll()

cursor = arcpy.da.InsertCursor(shpname, ["SHAPE@"])

for f in featureList:
cursor.insertRow([f])

Outcomes