<?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: Creating 3D line from points with python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172738#M13302</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a thought, since ArcMap is for viewing and editting 2-D features, perhaps you can only edit the x and y in an edit session in ArcMap, and Z values are not given.&amp;nbsp; Try editting your 3-D line in ArcScene and see if it has a Z value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Sep 2014 17:29:47 GMT</pubDate>
    <dc:creator>IanMurray</dc:creator>
    <dc:date>2014-09-16T17:29:47Z</dc:date>
    <item>
      <title>Creating 3D line from points with python</title>
      <link>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172737#M13301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a series of points with X,Y,Z coordinates. I am trying to create a polylines from the points. Points should be vertexes of the polyline and Z-Coordinate should be used to define the elevation of vertexes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a script which works, but the Z-Coordinate is lost on vertexes and is recorded as ZERO. I am sure that my script is correct because if I pass the Z-Coordinate into the M value, it is recorded correctly. The part of the script which creates the line can be seen below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;vertexArray = arcpy.Array()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for points in pointArray:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xCoord = valueX&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yCoord = valueY&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zCoord = valueZ&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # valueZ is also passed to M dimension to test if there are some problems with values&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; currentPoint = arcpy.Point(valueX, valueY, valueZ, valueZ)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vertexArray.add(currentPoint)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;newLineCursor = arcpy.da.InsertCursor(outputFc, ["SHAPE@"])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp; polyline = arcpy.Polyline(vertexArray)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp; newLineCursor.insertRow([polyline])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;The script runs wihtout problems, and the polylines are created. But when I check in ArcMAP the polyline under sketch properties all the vertexes on line have null as Z-Coordinate (see image bellow). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&lt;IMG alt="edit sketch properties.jpg" class="jive-image image-1" src="/legacyfs/online/12851_edit sketch properties.jpg" style="height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;I have just tested to convert points with arcpy.PointsToLine_management, and it works correctly. I could implement this in my script, but I am still curious as to why is Z-Coordinate not recorded properly with my script.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Thanks, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Martin&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 16:29:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172737#M13301</guid>
      <dc:creator>MartinSirkovsky</dc:creator>
      <dc:date>2014-09-16T16:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creating 3D line from points with python</title>
      <link>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172738#M13302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a thought, since ArcMap is for viewing and editting 2-D features, perhaps you can only edit the x and y in an edit session in ArcMap, and Z values are not given.&amp;nbsp; Try editting your 3-D line in ArcScene and see if it has a Z value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 17:29:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172738#M13302</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2014-09-16T17:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Creating 3D line from points with python</title>
      <link>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172739#M13303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the feature class z enabled? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000002p000000" title="http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000002p000000"&gt;Create Feature Class (Data Management)&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;has_z parameter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 17:34:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172739#M13303</guid>
      <dc:creator>TimothyHales</dc:creator>
      <dc:date>2014-09-16T17:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: Creating 3D line from points with python</title>
      <link>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172740#M13304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it is Z enabled. You can see it at the image I have attached, that there is a z-coordinate. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can edit Z values in ArcMap by typing z values in sketch properties. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 18:17:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172740#M13304</guid>
      <dc:creator>MartinSirkovsky</dc:creator>
      <dc:date>2014-09-16T18:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Creating 3D line from points with python</title>
      <link>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172741#M13305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried "&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;PointsToLine_management" which almost does what I need it to do. And that tool works in ArcMap. So I guess the script should work. Is it a bug?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 19:25:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172741#M13305</guid>
      <dc:creator>MartinSirkovsky</dc:creator>
      <dc:date>2014-09-16T19:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating 3D line from points with python</title>
      <link>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172742#M13306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using v10.2 and regularly create polylineZM's from coordinates in python. So no bugs.&lt;/P&gt;&lt;P&gt;Be aware that when you create the geometry you should specify the SR of that geometry.&lt;/P&gt;&lt;P&gt;But that is unlikely to be the issue here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 08:58:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172742#M13306</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2014-09-17T08:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: Creating 3D line from points with python</title>
      <link>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172743#M13307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried a different approach and got it to work. Actually what I am trying to accomplish is to convert line file to 3D based on points. As it is not possible to snap 3D in ArcMap the lines constructed from surveying points in ArcMap are placed on zero elevation. After the lines are constructed, I am using the point file to change the elevation on the vertexes to the original one. The working script can be seen here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;import arcpy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;shapeFileFolder = "folder where the files are located"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;fileToProcess = "line or polygon file"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;fileWith3DPoints = "file with 3D points which were used to construct the lines"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;arcpy.env.workspace = shapeFileFolder&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;arcpy.env.overwriteOutput = True&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;def convertTo3D(fc, zPoints):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; # Dictionary to hold the point coordinates (key: x,y coord, value: z coord)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; zCoordDict = {}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; # Create an array which will hold geometries of point feature class&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; fields = ["SHAPE@X","SHAPE@Y","SHAPE@Z"]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; with arcpy.da.SearchCursor(zPoints, fields) as cursor:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # round the coordinates to 3 decimal places&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xCoord = round(row[0], 3)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yCoord = round(row[1], 3)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zCoord = round(row[2], 3)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # add key:value for current point to the dictionary&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zCoordDict[str(xCoord) + "," + str(yCoord)] = zCoord&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; # Update Z coord in input file&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; fields = ["SHAPE@X","SHAPE@Y","SHAPE@Z"]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; cursor = arcpy.da.UpdateCursor(fc, fields, None, None, True)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; for row in cursor:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get x,y coordinates of current point&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xCoord = str(round(row[0],3))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yCoord = str(round(row[1],3))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newZCoord = zCoordDict[xCoord +"," + yCoord]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "New Z coordinate for current point is %s" % (newZCoord)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; row[2] = newZCoord&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;# Run the function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;convertTo3D(fileToProcess, fileWith3DPoints)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 09:36:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172743#M13307</guid>
      <dc:creator>MartinSirkovsky</dc:creator>
      <dc:date>2014-09-17T09:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Creating 3D line from points with python</title>
      <link>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172744#M13308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you create a 3D polyline object, you have to set the 'has_Z' property to True --&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; arcpy.Polyline (inputs, {spatial_reference}, {has_z}, {has_m})&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you do this the polyline will retain the Z coordinates in your points. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 23:52:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172744#M13308</guid>
      <dc:creator>MichaelFell</dc:creator>
      <dc:date>2015-06-07T23:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Creating 3D line from points with python</title>
      <link>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172745#M13309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very true what &lt;A href="https://community.esri.com/migrated-users/55418"&gt;Michael Fell&lt;/A&gt; mentions. You can see how to convert 3D point to 3D lines with python code in the thread below:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/159617"&gt;Convert 3D points to 3D lines (underground well data)&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 03:09:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172745#M13309</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-06-08T03:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Creating 3D line from points with python</title>
      <link>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172746#M13310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a point of information here - I was writing a script to write some 3D polylines to an empty feature class. I was having trouble adding the Z value, pretty much the same as Martin Sirkovsky's initial post. I tried setting the 'has_z' to true when I created a polyline, but I was getting an error saying that attribute was read only. The solution: despite both being optional parameters you need to have a spatial reference value set before you can set has_z to true.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 13:29:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172746#M13310</guid>
      <dc:creator>TanyaKnowles2</dc:creator>
      <dc:date>2015-12-14T13:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Creating 3D line from points with python</title>
      <link>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172747#M13311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael Fells point is important, but be aware that there is some strange behavior in arcpy (as of 10.4.1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #222222; background-color: #ffffff; font-size: small;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;polyline = arcpy.Polyline(line_array, sr, True)&lt;/SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;# This works&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #222222; background-color: #ffffff; font-size: small;"&gt;&lt;/DIV&gt;&lt;DIV style="color: #222222; background-color: #ffffff; font-size: small;"&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;.. but this fails&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #222222; background-color: #ffffff; font-size: small;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;polyline = arcpy.Polyline(line_array, spatial_reference=sr, has_z=True)&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV style="color: #222222; background-color: #ffffff; font-size: small;"&gt;&lt;/DIV&gt;&lt;DIV style="color: #222222; background-color: #ffffff; font-size: small;"&gt;&lt;SPAN&gt;If you supply the arguments by position it works, but if you use keyword args it fails.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2019 16:21:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-3d-line-from-points-with-python/m-p/172747#M13311</guid>
      <dc:creator>DanielBean1</dc:creator>
      <dc:date>2019-05-21T16:21:54Z</dc:date>
    </item>
  </channel>
</rss>

