<?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: Get line direction/orientation as a numeric field in Spatial Data Science Questions</title>
    <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532979#M1219</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I wanted to use the Code to define the deviation from north in degree. Where north would be 0 east 90 south 180 and west 270. So I changed the code to this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;180 + math.atan2((!Shape.lastpoint.X! - !Shape.firstpoint.X!),(!Shape.lastpoint.Y! - !Shape.firstpoint.Y!)) * (180 / math.pi)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So far so good, BUT for everything in western direction I get a negative value eg. -90 instead of 270. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any mathematical genius that can enlighten me?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Sep 2011 02:30:09 GMT</pubDate>
    <dc:creator>chriss_</dc:creator>
    <dc:date>2011-09-07T02:30:09Z</dc:date>
    <item>
      <title>Get line direction/orientation as a numeric field</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532973#M1213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Should be a simple one here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I get ArcGIS 10 to return the orientation (or direction) of each line in a polyline feature into a field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;what do I need to type into field calculator (or is there a better way)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ta&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2011 03:48:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532973#M1213</guid>
      <dc:creator>AlanAitken</dc:creator>
      <dc:date>2011-05-02T03:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get line direction/orientation as a numeric field</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532974#M1214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To calculate angle of lines fill calculate values with parser python using this python line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
180 + math.atan2((!Shape.lastpoint.Y! - !Shape.firstpoint.Y!),(!Shape.lastpoint.X! - !Shape.firstpoint.X!)) * (180 / math.pi)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this help you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Fred&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:10:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532974#M1214</guid>
      <dc:creator>FrédéricPRALLY</dc:creator>
      <dc:date>2021-12-11T23:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Get line direction/orientation as a numeric field</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532975#M1215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Fred, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Trig seems obvious now, but good to get the python syntax&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Works&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2011 00:38:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532975#M1215</guid>
      <dc:creator>AlanAitken</dc:creator>
      <dc:date>2011-05-03T00:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Get line direction/orientation as a numeric field</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532976#M1216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there any means to attribute a field of a Polyline with the line bearing within a model? I have a model I need to package and distribute to other operators who are still using 9.3. Ideally it needs as few add-ons as possible to function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jun 2011 09:37:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532976#M1216</guid>
      <dc:creator>SteveFeeney</dc:creator>
      <dc:date>2011-06-19T09:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Get line direction/orientation as a numeric field</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532977#M1217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please disregard my last post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Some revision and self education later and I can see it has already been answered above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I input the python code, I'm using the "Calculate Field" management tool with expression type as "Python 9.3". The function calculates fine but returns different values to the ones I manually measured using MA. Am I using it correctly?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 13:36:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532977#M1217</guid>
      <dc:creator>SteveFeeney</dc:creator>
      <dc:date>2011-06-23T13:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Get line direction/orientation as a numeric field</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532978#M1218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So does this code provide the bearing of a polyline with reference to north?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 05:11:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532978#M1218</guid>
      <dc:creator>AlexanderBeavis</dc:creator>
      <dc:date>2011-08-23T05:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Get line direction/orientation as a numeric field</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532979#M1219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I wanted to use the Code to define the deviation from north in degree. Where north would be 0 east 90 south 180 and west 270. So I changed the code to this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;180 + math.atan2((!Shape.lastpoint.X! - !Shape.firstpoint.X!),(!Shape.lastpoint.Y! - !Shape.firstpoint.Y!)) * (180 / math.pi)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So far so good, BUT for everything in western direction I get a negative value eg. -90 instead of 270. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any mathematical genius that can enlighten me?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2011 02:30:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532979#M1219</guid>
      <dc:creator>chriss_</dc:creator>
      <dc:date>2011-09-07T02:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Get line direction/orientation as a numeric field</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532980#M1220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The radians thing didn't help me either so I used this to return a North Azimuth based reference. Hope it helps someone...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Field (type double) = NorthAzimuth( !Shape! )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Codeblock:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def NorthAzimuth(Pline):
&amp;nbsp; degBearing = math.degrees(math.atan2((Pline.lastPoint.X - Pline.firstPoint.X),(Pline.lastPoint.Y - Pline.firstPoint.Y)))
&amp;nbsp; if (degBearing &amp;lt; 0):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; degBearing += 360.0
&amp;nbsp; return degBearing&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:10:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532980#M1220</guid>
      <dc:creator>BradyCallahan</dc:creator>
      <dc:date>2021-12-11T23:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Get line direction/orientation as a numeric field</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532981#M1221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This may be a bit basic,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a tool called 'Linear Directional Mean' that will create and populate a compass bearing field with the mean direction of a shapefile/featureclass or, if you use a unique field, for each feature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as I can tell it is planar rather than geodesic but it's a sound, quick fix and saves coding trig.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 18:31:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532981#M1221</guid>
      <dc:creator>SteveFeeney</dc:creator>
      <dc:date>2011-10-12T18:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Get line direction/orientation as a numeric field</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532982#M1222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not a phyton programmer but I run into the same problem: finding the deviation from North. I solved it (or it seems) by swopping firstpoint and lastpoint in the following way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;180+math.atan2(( !Shape.firstpoint.X! - !Shape.lastpoint.X! ),( !Shape.firstpoint.Y! - !Shape.lastpoint.Y! ) ) * (180 / math.pi )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems to me that it returns exactly the deviation from North!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please check this out&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Marco Rusmini&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi!&lt;BR /&gt;I wanted to use the Code to define the deviation from north in degree. Where north would be 0 east 90 south 180 and west 270. So I changed the code to this:&lt;BR /&gt;&lt;BR /&gt;180 + math.atan2((!Shape.lastpoint.X! - !Shape.firstpoint.X!),(!Shape.lastpoint.Y! - !Shape.firstpoint.Y!)) * (180 / math.pi)&lt;BR /&gt;&lt;BR /&gt;So far so good, BUT for everything in western direction I get a negative value eg. -90 instead of 270. &lt;BR /&gt;&lt;BR /&gt;Any mathematical genius that can enlighten me?&lt;BR /&gt;Thanks&lt;BR /&gt;Chris&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2012 12:33:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532982#M1222</guid>
      <dc:creator>MarcoRusmini</dc:creator>
      <dc:date>2012-06-01T12:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Get line direction/orientation as a numeric field</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532983#M1223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The formula by Brady is the only correct formula proposed above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The basic formula to calculate degrees from two points is only correct in Brady's formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;math.degrees(math.atan2((!Shape.lastPoint.X! - !Shape.firstPoint.X!),(!Shape.lastPoint.Y! - !Shape.firstPoint.Y!)))&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;math.atan2((!Shape.lastpoint.X! - !Shape.firstpoint.X!),(!Shape.lastpoint.Y! - !Shape.firstpoint.Y!)) * (180 / math.pi)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This formula starts with 0 degrees pointing north and produces positive angles in the positive X axis (east half) and negative angles in the negative x axis (west half) of the quadrants:&amp;nbsp; To make all angles positive so that it is clearer that they are all increasing in a clockwise direction, the formula needs to only add 360 to all of the negative angles in the West half of the quadrants.&amp;nbsp; Brady's codeblock does this and using the codeblock this way is the only efficient way to do this calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although the expression below runs much slower than Brady's codeblock, it is possible to do this calculation correctly without using a codeblock by using a single in-line if python expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;360 + math.degrees(math.atan2((!Shape.lastpoint.X! - !Shape.firstpoint.X!),(!Shape.lastpoint.Y! - !Shape.firstpoint.Y!))) if math.degrees(math.atan2((!Shape.lastpoint.X! - !Shape.firstpoint.X!),(!Shape.lastpoint.Y! - !Shape.firstpoint.Y!))) &amp;lt; 0 else math.degrees(math.atan2((!Shape.lastpoint.X! - !Shape.firstpoint.X!),(!Shape.lastpoint.Y! - !Shape.firstpoint.Y!)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code is slower than Brady's code since it has to extract the end points from the line and do the degree calculation multiple times, while his calculation only does those 2 steps once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By adding 180 degrees to the basic formula, Criss has made 0 and 360 degrees represent a line that is pointed South and messed up the quadrants of the angles.&amp;nbsp; Marco's formula defaults to a South (180 degree) line orientation, but by swapping the points he has reversed the orientation of the line relative to its real orientation, which I believe restores the real line orientation to show north as 0 or 360 degrees and fixes the messed up quadrants of the angles.&amp;nbsp; I think Marco's formula may actually work except when it is used with a closed line (both ends are the same point) which will be reported as 180 degrees and not as 0 degrees.&amp;nbsp; However, closed lines are a special case, and none of the formulas make it possible to distinguish that situation from a line that is actually oriented due north (for Brady's formula) or due south (for Marco's formula).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;SPAN style="color: #000000; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Linear Directional Mean tool does produce angles that are compass oriented, and takes into consideration more than just the two end points of the line.&amp;nbsp; So it provides a fuller analysis of the line direction for complex polylines and populates additional fields that make it possible to identify closed polylines and polylines where the angle between the end points does not really correspond to the overall directional trend of the polyline.&amp;nbsp; The trig formula is really only accurate for two point lines that fall within the bounds that a Projected Coordinate System has been optimized to cover.&amp;nbsp; It does not really work very well for polylines with many vertices that have severe changes in directions between the two end points or lines that extend beyond the appropriate bounds of a Projected Coordinate System.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2016 19:36:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532983#M1223</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2016-03-09T19:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Get line direction/orientation as a numeric field</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532984#M1224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use Radians for determining Azimuth's and convert it back to 360 degrees....&amp;nbsp; here is a VB snippet of code I use from an interactive addIn I created.&amp;nbsp; Me.lng/Me.Lat is the user's selected start point of the line&amp;nbsp; destination is the lat/lng of the endpoint.&amp;nbsp; Some Python guru can easily convert this to Python...&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Public Function GetAzimuth(destination As LatLng) As Double
&amp;nbsp; Dim longitudinalDifference = destination.Lng - Me.Lng
&amp;nbsp; Dim latitudinalDifference = destination.Lat - Me.Lat
&amp;nbsp; Dim azimuth = (Math.PI * 0.5) - Math.Atan(latitudinalDifference / longitudinalDifference)
&amp;nbsp; If longitudinalDifference &amp;gt; 0 Then
&amp;nbsp;&amp;nbsp; Return azimuth
&amp;nbsp; ElseIf longitudinalDifference &amp;lt; 0 Then
&amp;nbsp;&amp;nbsp; Return azimuth + Math.PI
&amp;nbsp; ElseIf latitudinalDifference &amp;lt; 0 Then
&amp;nbsp;&amp;nbsp; Return Math.PI
&amp;nbsp; End If
&amp;nbsp; Return 0.0
End Function


Public Function GetDegreesAzimuth(destination As LatLng) As Double
&amp;nbsp; Return RadiansToDegreesConversionFactor * GetAzimuth(destination)
End Function


&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:10:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532984#M1224</guid>
      <dc:creator>TedKowal</dc:creator>
      <dc:date>2021-12-11T23:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get line direction/orientation as a numeric field</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532985#M1225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this thread shows the basics of a numpy/python implementation... getting the start and endpoints can be done with FeatureclassToNumPyArray, then distances and angles from a source to a destination(s) is quick&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/thread/66222#comment-570366" title="https://community.esri.com/thread/66222#comment-570366"&gt;https://community.esri.com/thread/66222#comment-570366&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 15:56:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532985#M1225</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-03-10T15:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get line direction/orientation as a numeric field</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532986#M1226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do want to note that if you have a logitudinalDifference that equals 0 you will generate a zero division error with this code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 20:02:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532986#M1226</guid>
      <dc:creator>DiegoNegron</dc:creator>
      <dc:date>2016-06-06T20:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Get line direction/orientation as a numeric field</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532987#M1227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! it worked !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 13:16:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532987#M1227</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-09-05T13:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Get line direction/orientation as a numeric field</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532988#M1228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You, sir, are my personal hero of the day. Thank you so much for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Jan 2020 14:11:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/get-line-direction-orientation-as-a-numeric-field/m-p/532988#M1228</guid>
      <dc:creator>MarkusGeier</dc:creator>
      <dc:date>2020-01-26T14:11:58Z</dc:date>
    </item>
  </channel>
</rss>

