<?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: Convert 3D points to 3D lines (underground well data) in 3D Questions</title>
    <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491762#M2970</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using ArcGIS 10.3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2015 15:22:51 GMT</pubDate>
    <dc:creator>Naga_RaghuveerModala</dc:creator>
    <dc:date>2015-05-26T15:22:51Z</dc:date>
    <item>
      <title>Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491757#M2965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to convert the measured 3D points data into 3D lines. The data is underground vertical well data. When I am converting from points to line the conversion process is failing to capture the Z values and the lines are being drawn on the surface horizontally. I can understand the issue but I am not sure how to solve it. Any suggestions would be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2015 20:37:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491757#M2965</guid>
      <dc:creator>Naga_RaghuveerModala</dc:creator>
      <dc:date>2015-05-25T20:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491758#M2966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the standard tool is not working, you could always use some Python code to create the 3D lines. The thread below shows a snippet to convert a 2D polygon into a 3D polygon (and later into a PolylineZM). &lt;A href="https://community.esri.com/message/516789"&gt;Re: M for a XYZ polyline&lt;/A&gt; &lt;/P&gt;&lt;P&gt;I guess the code can be adjusted to read a 3D point featureclass and create 3D lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are willing to share some sample data I can adjust the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2015 23:19:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491758#M2966</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-05-25T23:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491759#M2967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Howdy Bakker,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your direction. I will first try to develop the python code based on your link. If I am unable to solve the issue, I am willing to share a sample dataset with you. Is there any way I can send the dataset directly ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you once again. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raghuveer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2015 23:49:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491759#M2967</guid>
      <dc:creator>Naga_RaghuveerModala</dc:creator>
      <dc:date>2015-05-25T23:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491760#M2968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your data is classified, and you can't share it, then don't share it. No problem. It will help in order to determine if there is a field that identifies which points below to which line, the order of the points and if other attributes should be considered (also if the geometry is 3D or the Z is stored as attribute). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case you need further assistance please specify those details and the version of ArcGIS you have installed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you run into problems while coding, you can post back what you have done so far and me and/or other users can provide help in fixing the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 02:59:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491760#M2968</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-05-26T02:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491761#M2969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The data is collected at various depths vertically and we have Z value attribute and other attributes as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 13:45:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491761#M2969</guid>
      <dc:creator>Naga_RaghuveerModala</dc:creator>
      <dc:date>2015-05-26T13:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491762#M2970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using ArcGIS 10.3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:22:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491762#M2970</guid>
      <dc:creator>Naga_RaghuveerModala</dc:creator>
      <dc:date>2015-05-26T15:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491763#M2971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code below seems to be working...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="3Dpolyline.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/103716_3Dpolyline.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def main():
&amp;nbsp;&amp;nbsp;&amp;nbsp; import arcpy
&amp;nbsp;&amp;nbsp;&amp;nbsp; import os

&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.overwriteOutput = True

&amp;nbsp;&amp;nbsp;&amp;nbsp; fc_pnt = r"D:\Xander\GeoNet\3Dpoints_3Dlines\gdb\test.gdb\points3D_v02"
&amp;nbsp;&amp;nbsp;&amp;nbsp; fc_z = r"D:\Xander\GeoNet\3Dpoints_3Dlines\gdb\test.gdb\polylineZ"

&amp;nbsp;&amp;nbsp;&amp;nbsp; fld_lineid = "LineID"
&amp;nbsp;&amp;nbsp;&amp;nbsp; fld_order = "Elevation"

&amp;nbsp;&amp;nbsp;&amp;nbsp; # create a new fc Z enabled, but no M values
&amp;nbsp;&amp;nbsp;&amp;nbsp; fc_ws, fc_name = os.path.split(fc_z)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CreateFeatureclass_management(fc_ws, fc_name, "POLYLINE", fc_pnt, "DISABLED", "ENABLED", fc_pnt)

&amp;nbsp;&amp;nbsp;&amp;nbsp; # write the geometries to the new fc
&amp;nbsp;&amp;nbsp;&amp;nbsp; sr = arcpy.Describe(fc_pnt).spatialReference
&amp;nbsp;&amp;nbsp;&amp;nbsp; # flds_in = ("SHAPE@", fld_lineid, fld_order)
&amp;nbsp;&amp;nbsp;&amp;nbsp; fld_shp_in = arcpy.Describe(fc_pnt).shapeFieldName
&amp;nbsp;&amp;nbsp;&amp;nbsp; sort_flds = "{0} A; {1} A".format(fld_lineid, fld_order)
&amp;nbsp;&amp;nbsp;&amp;nbsp; flds_in = "{0}; {1}; {2}".format(fld_shp_in, fld_lineid, fld_order)
&amp;nbsp;&amp;nbsp;&amp;nbsp; flds_out = ("SHAPE@", fld_lineid)

&amp;nbsp;&amp;nbsp;&amp;nbsp; lineid = "NotSet"
&amp;nbsp;&amp;nbsp;&amp;nbsp; lst_poly_z = []
&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.InsertCursor(fc_z, flds_out) as curs_out:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curs = arcpy.SearchCursor(fc_pnt, fields=flds_in, sort_fields=sort_flds)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in curs:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pnt = row.getValue(fld_shp_in)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prev_lineid = lineid
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lineid = row.getValue(fld_lineid)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if prev_lineid == lineid:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # add point to line
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lst_poly_z.append(pnt.firstPoint)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # write previous line and start new one
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if len(lst_poly_z) &amp;gt; 1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyline_z = arcpy.Polyline(arcpy.Array(lst_poly_z), sr, True, False)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row_out = [polyline_z, prev_lineid]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curs_out.insertRow(tuple(row_out))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lst_poly_z = []
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lst_poly_z.append(pnt.firstPoint)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # write last polyline
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if len(lst_poly_z) &amp;gt; 1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyline_z = arcpy.Polyline(arcpy.Array(lst_poly_z), sr, True, False)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row_out = [polyline_z, lineid]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curs_out.insertRow(tuple(row_out))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; del curs, row

if __name__ == '__main__':
&amp;nbsp;&amp;nbsp;&amp;nbsp; main()&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;line 7 and 8 hold the paths to input 3D points and output 3D lines&lt;/LI&gt;&lt;LI&gt;line 10 holds the name of the input field that identifies the lines (for each unique value in this field points will be combined into a single line)&lt;/LI&gt;&lt;LI&gt;line 11 holds the name of the input field that provides the order of the points when creating the line (I used the same Z value)&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:38:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491763#M2971</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-11T21:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491764#M2972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bakker, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally I got permission to share some sample dataset&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 19:07:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491764#M2972</guid>
      <dc:creator>Naga_RaghuveerModala</dc:creator>
      <dc:date>2015-05-26T19:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491765#M2973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/26537"&gt;Naga Raghuveer Modala&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will have a look at it and come back to you as soon as possible. If I have any questions I will post them here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, my first name is Xander. You can call me Xander.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards, Xander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 22:34:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491765#M2973</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-05-26T22:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491766#M2974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some assumptions and questions:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;api_wellno, contains the id that distinguishes each line (in this case there are two lines)&lt;/LI&gt;&lt;LI&gt;bh_long, longitude in decimal degrees WGS 1984&lt;/LI&gt;&lt;LI&gt;bh_lat, latitude in decimal degrees WGS 1984&lt;/LI&gt;&lt;LI&gt;Z, Z value of point (although there is a measdpth too) in what unit is this? cms?&lt;/LI&gt;&lt;LI&gt;what is the field that indicates the order of the points to connect them to a line?&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 22:44:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491766#M2974</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-05-26T22:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491767#M2975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Xander,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;you are correct, there are two wells&lt;/LI&gt;&lt;LI&gt;bh_long and bh_lat represents the longitude and latitude in decimal degress.&lt;/LI&gt;&lt;LI&gt;Z values are the neg values of measdpth&lt;/LI&gt;&lt;LI&gt;The field that indicates the order is also the measdpth. Measurements were made at various depths, so the order will be the top most depth to the deepest depth.&lt;/LI&gt;&lt;LI&gt;The units are in feet. &lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 22:50:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491767#M2975</guid>
      <dc:creator>Naga_RaghuveerModala</dc:creator>
      <dc:date>2015-05-26T22:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491768#M2976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the code that you could use to convert the csv into a 3D polyline:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def main():
&amp;nbsp;&amp;nbsp;&amp;nbsp; import csv
&amp;nbsp;&amp;nbsp;&amp;nbsp; import arcpy

&amp;nbsp;&amp;nbsp;&amp;nbsp; # input csv
&amp;nbsp;&amp;nbsp;&amp;nbsp; csv_path = r"C:\Forum\3Dpnts_3Dlines\SampleData_well.csv"
&amp;nbsp;&amp;nbsp;&amp;nbsp; fld_x = 'bh_long'
&amp;nbsp;&amp;nbsp;&amp;nbsp; fld_y = 'bh_lat'
&amp;nbsp;&amp;nbsp;&amp;nbsp; fld_z = 'Z'
&amp;nbsp;&amp;nbsp;&amp;nbsp; fld_order = 'measdpth'
&amp;nbsp;&amp;nbsp;&amp;nbsp; fld_lineid = 'api_wellno'

&amp;nbsp;&amp;nbsp;&amp;nbsp; # settings
&amp;nbsp;&amp;nbsp;&amp;nbsp; sr = arcpy.SpatialReference(4326) # WGS_1984
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.overwriteOutput = True
&amp;nbsp;&amp;nbsp;&amp;nbsp; feetinmeter = 0.3048

&amp;nbsp;&amp;nbsp;&amp;nbsp; # output featureclass (could also point to fc in fgdb)
&amp;nbsp;&amp;nbsp;&amp;nbsp; fc = r"C:\Forum\3Dpnts_3Dlines\shp\test01.shp"

&amp;nbsp;&amp;nbsp;&amp;nbsp; lineids = []
&amp;nbsp;&amp;nbsp;&amp;nbsp; dct = {}
&amp;nbsp;&amp;nbsp;&amp;nbsp; # read csv
&amp;nbsp;&amp;nbsp;&amp;nbsp; with open(csv_path, 'rb') as f:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reader = csv.reader(f)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cnt = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in reader:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cnt += 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if cnt == 1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # header
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; header = row
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # read fields from data
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lineid = row[header.index(fld_lineid)]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x = float(row[header.index(fld_x)])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = float(row[header.index(fld_y)])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; z = float(row[header.index(fld_z)]) * feetinmeter

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # create point object with XYZ
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pnt = arcpy.Point(x, y, z)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # read order and create string to sort on (lineid + order)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; order = row[header.index(fld_order)]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; srt =&amp;nbsp; "{0}_{1}".format("%04d" % (int(lineid),),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "{0}".format(round(float(order), 1)).zfill(8))

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # create nested dictionary with points per line
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if lineid in dct:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dct[lineid][srt] = pnt
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dct[lineid] = {}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dct[lineid][srt] = pnt

&amp;nbsp;&amp;nbsp;&amp;nbsp; # create polylines
&amp;nbsp;&amp;nbsp;&amp;nbsp; lst_polylines = []
&amp;nbsp;&amp;nbsp;&amp;nbsp; for lineid, dct2 in dct.items():
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lst_pnt = []
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for srt, pnt in sorted(dct2.items()):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lst_pnt.append(pnt)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyline = arcpy.Polyline(arcpy.Array(lst_pnt), sr, True, False)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lst_polylines.append(polyline)

&amp;nbsp;&amp;nbsp;&amp;nbsp; # write polylines to output featureclass
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(lst_polylines, fc)

if __name__ == '__main__':
&amp;nbsp;&amp;nbsp;&amp;nbsp; main()&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:38:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491768#M2976</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-11T21:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491769#M2977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Xander,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much. The code is working great. I just made minor changes to the code. I removed the conversion factor to fit to my requirements. The output is decent and satisfactory to most extent. when the line curvature exists the points and the line doesnt align properly though. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 14:32:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491769#M2977</guid>
      <dc:creator>Naga_RaghuveerModala</dc:creator>
      <dc:date>2015-05-27T14:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491770#M2978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A small explanation of what is going on, on line 44 and 45:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;srt =&amp;nbsp; "{0}_{1}".format("%04d" % (int(lineid),), 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "{0}".format(round(float(order), 1)).zfill(8)) &lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It creates a string combining the lineid (e.g. 102) and the order (e.g. 5482.0) into a string that will be used as key for the dictionary. The dictionary is sorted on key (see line 58) and the string "srt"&amp;nbsp; will have a value like: "0102_005482.0". This allows to sort on line and per line on order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also: &lt;A href="https://community.esri.com/docs/DOC-1927" target="_blank"&gt;Some Python Snippets&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:38:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491770#M2978</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-11T21:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491771#M2979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying understand this code. When i apply the same code with slight modifications to different set of data. It isn't working correctly. The new data has a lineID of 14 characters and the order varying from 3 to 5 characters. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 14:05:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491771#M2979</guid>
      <dc:creator>Naga_RaghuveerModala</dc:creator>
      <dc:date>2015-05-28T14:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491772#M2980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if the lineid is always 14 characters, or if it is not numerical you could simply do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;srt =&amp;nbsp; "{0}_{1}".format(lineid, 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "{0}".format(round(float(order), 1)).zfill(8)) &lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is probably not important in which order the lines are processed. What is important is the order of the points per line being processed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:38:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491772#M2980</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-11T21:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491773#M2981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Xander,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whoop! Its not the code I had problem with. its the format of my CSV columns. After fixing that issue everything looks great. Thank you very much Xander for all your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 15:23:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491773#M2981</guid>
      <dc:creator>Naga_RaghuveerModala</dc:creator>
      <dc:date>2015-05-28T15:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Convert 3D points to 3D lines (underground well data)</title>
      <link>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491774#M2982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad it works now. The fields are hard coded...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 19:09:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/convert-3d-points-to-3d-lines-underground-well/m-p/491774#M2982</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-05-28T19:09:47Z</dc:date>
    </item>
  </channel>
</rss>

