<?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: Create lines at specific bearing in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093245#M44926</link>
    <description>&lt;P&gt;Dan, here you go. As mentioned above I did try converting to a table in the geodatabase as well still same error.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Aug 2021 19:10:19 GMT</pubDate>
    <dc:creator>TinaKwitkoski</dc:creator>
    <dc:date>2021-08-27T19:10:19Z</dc:date>
    <item>
      <title>Create lines at specific bearing</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1092516#M44831</link>
      <description>&lt;P&gt;&amp;nbsp;I am wondering if there is a script that will create multiple lines based on the bearing and coordinates of a point feature held in a XLS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am trying to do is create slope arrows for a cruise plan map.&amp;nbsp; I have a slope table (xls), with ID, Length, Bearing, Slope%, Easting, Northing. Currently I create each line using the create line =&amp;gt; Direction, length using the xls which is fine if I have only a few. But when I have 50+ to create it is time consuming. It would be nice to run a script/tool to create my lines automatically.. is there such a thing out there?&amp;nbsp; I searched online did not see anything helpful.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help much appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tina&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 22:50:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1092516#M44831</guid>
      <dc:creator>TinaKwitkoski</dc:creator>
      <dc:date>2021-08-25T22:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create lines at specific bearing</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1092525#M44832</link>
      <description>&lt;P&gt;perhaps&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/bearing-distance-to-line.htm" target="_blank"&gt;Bearing Distance To Line (Data Management)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;if the data are in, or can be derived, in your table&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 23:17:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1092525#M44832</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-08-25T23:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create lines at specific bearing</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1092613#M44844</link>
      <description>&lt;P&gt;Can you please provide an example table (snippet) and the result you want to create?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 08:32:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1092613#M44844</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2021-08-26T08:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Create lines at specific bearing</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093129#M44909</link>
      <description>&lt;P&gt;Johannes, I have attached a snip of the final product. Essentially I need to produce lines (in this case 40m long) starting at the plot drawn in the direction of the bearing given to me, then that line is displayed with a arrow symbol and labelled with the slope of the land in the direction of the line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently the only way I know how is to&amp;nbsp; create each line using the draw line tool =&amp;gt; direction/distance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tina&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 15:07:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093129#M44909</guid>
      <dc:creator>TinaKwitkoski</dc:creator>
      <dc:date>2021-08-27T15:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create lines at specific bearing</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093133#M44911</link>
      <description>&lt;P&gt;I will try that one thanks..&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 15:10:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093133#M44911</guid>
      <dc:creator>TinaKwitkoski</dc:creator>
      <dc:date>2021-08-27T15:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create lines at specific bearing</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093158#M44916</link>
      <description>&lt;P&gt;I tried this tool and get an error message, not sure why..&amp;nbsp; any ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 15:47:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093158#M44916</guid>
      <dc:creator>TinaKwitkoski</dc:creator>
      <dc:date>2021-08-27T15:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create lines at specific bearing</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093210#M44921</link>
      <description>&lt;P&gt;Hi Tina,&lt;/P&gt;&lt;P&gt;The csv screenshot seems fine, but the error message complains about OID -1. Would you be able to share the file so I can take a look? Thanks!&amp;nbsp; - Dan&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 17:13:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093210#M44921</guid>
      <dc:creator>DanLee</dc:creator>
      <dc:date>2021-08-27T17:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create lines at specific bearing</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093220#M44922</link>
      <description>&lt;P&gt;Did you try converting the csv to a file geodatabase table?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 17:51:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093220#M44922</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-08-27T17:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create lines at specific bearing</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093245#M44926</link>
      <description>&lt;P&gt;Dan, here you go. As mentioned above I did try converting to a table in the geodatabase as well still same error.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 19:10:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093245#M44926</guid>
      <dc:creator>TinaKwitkoski</dc:creator>
      <dc:date>2021-08-27T19:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create lines at specific bearing</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093274#M44928</link>
      <description>&lt;P&gt;Hi Tina, which version of Pro are you using?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 20:07:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093274#M44928</guid>
      <dc:creator>DanLee</dc:creator>
      <dc:date>2021-08-27T20:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Create lines at specific bearing</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093287#M44930</link>
      <description>&lt;P&gt;Dan&lt;/P&gt;&lt;P&gt;2.8.0 for Pro.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 20:48:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093287#M44930</guid>
      <dc:creator>TinaKwitkoski</dc:creator>
      <dc:date>2021-08-27T20:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create lines at specific bearing</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093366#M44942</link>
      <description>&lt;P&gt;Hi Tina,&lt;/P&gt;&lt;P&gt;Thanks for sharing the test data. We have tested in 2.6, 2.8, and our current development versions, but could not reproduce the problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DanLee_0-1630186501394.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/21946i4D4FC56B8F938395/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DanLee_0-1630186501394.png" alt="DanLee_0-1630186501394.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I noticed the OBJECTID values are not sequential. That should not matter. But you can try using Copy Rows tool to turn it to a gdb table, then run Bearing Distance To Line.&amp;nbsp; Hope that works.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Aug 2021 21:39:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093366#M44942</guid>
      <dc:creator>DanLee</dc:creator>
      <dc:date>2021-08-28T21:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create lines at specific bearing</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093483#M44959</link>
      <description>&lt;P&gt;Hmm, the tool worked for me...&lt;/P&gt;&lt;P&gt;Try constructing the lines yourself: edit the input and output parameters of this script and run it in the python window.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import logging

# define input data
in_table = "H:/testCruise_data_DDS.csv"
field_x = "Long"
field_y = "Lat"
field_distance = "distance"
field_bearing = "bearing"
wkid = 4326  # wkid of your data's coordinate system

# define output data
out_path = "memory"
out_name = "test"
out_fields = [  # list of [field_name, field_type]
    ["PLOT_ID", "LONG"],
    ["TYPE", "TEXT"],
    ["slope", "FLOAT"],
    ["bearing", "FLOAT"],
    ["Long", "FLOAT"],
    ["Lat", "FLOAT"],
    ]

# read data
fields = [f.name for f in arcpy.ListFields(in_table)]
data = [dict(zip(fields, row)) for row in arcpy.da.SearchCursor(in_table, fields)]

# construct lines
spatial_reference = arcpy.SpatialReference(wkid)
for d in data:
    try:
        point = arcpy.Point(d[field_x], d[field_y])
        point_geometry = arcpy.PointGeometry(point, spatial_reference)
        target_geometry = point_geometry.pointFromAngleAndDistance(d[field_bearing], d[field_distance])
        point_array = arcpy.Array([point_geometry.firstPoint, target_geometry.firstPoint])
        line_geometry = arcpy.Polyline(point_array, spatial_reference)
        d["SHAPE@"] = line_geometry
    except: # e.g. bearing or distance are empty
        logging.exception("Could not create line for this row: {}".format(d))
        d["SHAPE@"] = None

# create output fc
# skip this if you already have a line fc that you want to append to
out_fc = arcpy.management.CreateFeatureclass(out_path, out_name, "POLYLINE", spatial_reference=spatial_reference)
for f in out_fields:
    arcpy.management.AddField(out_fc, f[0], f[1])

# write the lines into out_fc
fields = ["SHAPE@"] + [f[0] for f in out_fields]
with arcpy.da.InsertCursor(out_fc, fields) as cursor:
    for d in data:
        values = [d[f] for f in fields]
        cursor.insertRow(values)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 30 Aug 2021 07:09:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093483#M44959</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2021-08-30T07:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create lines at specific bearing</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093786#M44991</link>
      <description>&lt;P&gt;sounds similar to a COGO traverse file,&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/editing/import-or-export-a-traverse-file.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/help/editing/import-or-export-a-traverse-file.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://desktop.arcgis.com/en/arcmap/latest/manage-data/creating-new-features/traverse-file-format.htm" target="_blank"&gt;https://desktop.arcgis.com/en/arcmap/latest/manage-data/creating-new-features/traverse-file-format.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 20:31:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093786#M44991</guid>
      <dc:creator>BillFox</dc:creator>
      <dc:date>2021-08-30T20:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create lines at specific bearing</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093839#M44998</link>
      <description>&lt;P&gt;As suggested earlier, excel to table or table-to-table tool with the output as a file geodatabase table, then run the tool which I suggested and Dan Lee confirmed works, unless the data fields are in the wrong format or the data content needs adjusting.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 22:35:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-lines-at-specific-bearing/m-p/1093839#M44998</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-08-30T22:35:42Z</dc:date>
    </item>
  </channel>
</rss>

