<?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 Convertion degree to azimuth in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/convertion-degree-to-azimuth/m-p/98200#M2612</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have 2 points which creates a line. I want to get angle of line and then draw another line with +30 degree. I can do it but I always get 7-10 degree more than actual angle.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get distance between 2 points using &lt;/SPAN&gt;&lt;STRONG&gt;IMeasurementTool.ConstructByPoints&lt;/STRONG&gt;&lt;SPAN&gt;, then I get angle using &lt;/SPAN&gt;&lt;STRONG&gt;IConstructAngle.ConstructLine&lt;/STRONG&gt;&lt;SPAN&gt;. Here I have angle and distance between 2 points. Now, I'll give &lt;/SPAN&gt;&lt;STRONG&gt;ConstructByPointDistAngle&lt;/STRONG&gt;&lt;SPAN&gt; first point, distance and angle to get second point. Now I calculate angle between first point and result point of &lt;/SPAN&gt;&lt;STRONG&gt;ConstructByPointDistAngle&lt;/STRONG&gt;&lt;SPAN&gt; but I get angle with 8.266233055077116 degree difference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I'm not convert degree to azimuth correctly. Any idea?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FYI: azimuth is degrees clockwise from north&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my working code with comment and Debug results. Red texts are debug results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
PointClass p1 = new PointClass();
PointClass p2 = new PointClass();
// Add data to points for test
p1.PutCoords(34.481560, 41.515391);
p2.PutCoords(34.702832, 41.795668);

ILine lineForAngle = new Line();
IMeasurementTool measurementTool = new MeasurementToolClass();

measurementTool.ConstructByPoints(p1, p2);
// Here we calculate distance between two points: (p1, p2)
double distance = measurementTool.Distance;

GeometryEnvironment geoEnv = new GeometryEnvironment();
IConstructAngle angleCalculator = (IConstructAngle)geoEnv;

lineForAngle.PutCoords(p1, p2);
// Here we calculate angle of line between (p1, p2) and the positive x-axis
double angle = angleCalculator.ConstructLine(lineForAngle);
// Convert radian to degree
angle *= 180 / Math.PI; // = 51.709836807757121 Degree
// Convert angle to azimuth (still degree)
angle = 90 - angle;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // = 38.290163192242879

// Here I give first point (p1), azimuth and distance to get p2
measurementTool.ConstructByPointDistAngle(p1, distance, angle);

geoEnv = new GeometryEnvironment();
angleCalculator = (IConstructAngle)geoEnv;

// I put p1 and result point of measurementTool which is a point
lineForAngle.PutCoords(p1, measurementTool.ToPoint);

// Now I have calculate angle between p1 and result of measurementTool
angle = angleCalculator.ConstructLine(lineForAngle);
angle *= 180 / Math.PI; // = 43.443603752680005

// first angle - result angle:
// 51.709836807757121 - 43.443603752680005 = 8.266233055077116
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 16:01:08 GMT</pubDate>
    <dc:creator>oyleiste</dc:creator>
    <dc:date>2021-12-12T16:01:08Z</dc:date>
    <item>
      <title>Convertion degree to azimuth</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/convertion-degree-to-azimuth/m-p/98200#M2612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have 2 points which creates a line. I want to get angle of line and then draw another line with +30 degree. I can do it but I always get 7-10 degree more than actual angle.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get distance between 2 points using &lt;/SPAN&gt;&lt;STRONG&gt;IMeasurementTool.ConstructByPoints&lt;/STRONG&gt;&lt;SPAN&gt;, then I get angle using &lt;/SPAN&gt;&lt;STRONG&gt;IConstructAngle.ConstructLine&lt;/STRONG&gt;&lt;SPAN&gt;. Here I have angle and distance between 2 points. Now, I'll give &lt;/SPAN&gt;&lt;STRONG&gt;ConstructByPointDistAngle&lt;/STRONG&gt;&lt;SPAN&gt; first point, distance and angle to get second point. Now I calculate angle between first point and result point of &lt;/SPAN&gt;&lt;STRONG&gt;ConstructByPointDistAngle&lt;/STRONG&gt;&lt;SPAN&gt; but I get angle with 8.266233055077116 degree difference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I'm not convert degree to azimuth correctly. Any idea?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FYI: azimuth is degrees clockwise from north&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my working code with comment and Debug results. Red texts are debug results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
PointClass p1 = new PointClass();
PointClass p2 = new PointClass();
// Add data to points for test
p1.PutCoords(34.481560, 41.515391);
p2.PutCoords(34.702832, 41.795668);

ILine lineForAngle = new Line();
IMeasurementTool measurementTool = new MeasurementToolClass();

measurementTool.ConstructByPoints(p1, p2);
// Here we calculate distance between two points: (p1, p2)
double distance = measurementTool.Distance;

GeometryEnvironment geoEnv = new GeometryEnvironment();
IConstructAngle angleCalculator = (IConstructAngle)geoEnv;

lineForAngle.PutCoords(p1, p2);
// Here we calculate angle of line between (p1, p2) and the positive x-axis
double angle = angleCalculator.ConstructLine(lineForAngle);
// Convert radian to degree
angle *= 180 / Math.PI; // = 51.709836807757121 Degree
// Convert angle to azimuth (still degree)
angle = 90 - angle;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // = 38.290163192242879

// Here I give first point (p1), azimuth and distance to get p2
measurementTool.ConstructByPointDistAngle(p1, distance, angle);

geoEnv = new GeometryEnvironment();
angleCalculator = (IConstructAngle)geoEnv;

// I put p1 and result point of measurementTool which is a point
lineForAngle.PutCoords(p1, measurementTool.ToPoint);

// Now I have calculate angle between p1 and result of measurementTool
angle = angleCalculator.ConstructLine(lineForAngle);
angle *= 180 / Math.PI; // = 43.443603752680005

// first angle - result angle:
// 51.709836807757121 - 43.443603752680005 = 8.266233055077116
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:01:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/convertion-degree-to-azimuth/m-p/98200#M2612</guid>
      <dc:creator>oyleiste</dc:creator>
      <dc:date>2021-12-12T16:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Convertion degree to azimuth</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/convertion-degree-to-azimuth/m-p/98201#M2613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Dear All,&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I have 2 points which creates a line. I want to get angle of line and then draw another line with +30 degree. I can do it but I always get 7-10 degree more than actual angle.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I get distance between 2 points using&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;IMeasurementTool.ConstructByPoints&lt;/STRONG&gt;, then I get angle using&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;IConstructAngle.ConstructLine&lt;/STRONG&gt;. Here I have angle and distance between 2 points. Now, I'll give&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;ConstructByPointDistAngle&lt;/STRONG&gt; first point, distance and angle to get second point. Now I calculate angle between first point and result point of&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;ConstructByPointDistAngle&lt;/STRONG&gt; but I get angle with 8.266233055077116 degree difference.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I think I'm not convert degree to azimuth correctly. Any idea?&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;FYI: azimuth is degrees clockwise from north&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;Here is my working code with comment and&amp;nbsp;&amp;nbsp; &lt;SPAN style="text-decoration:underline;"&gt;Debug results&lt;/SPAN&gt;. Red texts are debug results.&amp;nbsp; &lt;BR /&gt; &lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="color:&amp;quot;#40E0D0&amp;quot;;"&gt;PointClass&lt;/SPAN&gt; p1 = new &lt;SPAN style="color:&amp;quot;#40E0D0&amp;quot;;"&gt;PointClass&lt;/SPAN&gt;();
&lt;SPAN style="color:&amp;quot;#40E0D0&amp;quot;;"&gt;PointClass&lt;/SPAN&gt; p2 = new &lt;SPAN style="color:&amp;quot;#40E0D0&amp;quot;;"&gt;PointClass&lt;/SPAN&gt;();
&lt;SPAN style="color:&amp;quot;#008000&amp;quot;;"&gt;// Add data to points for test&lt;/SPAN&gt;
p1.PutCoords(34.481560, 41.515391);
p2.PutCoords(34.702832, 41.795668);

&lt;SPAN style="color:&amp;quot;#40E0D0&amp;quot;;"&gt;ILine&lt;/SPAN&gt; lineForAngle = new &lt;SPAN style="color:&amp;quot;#40E0D0&amp;quot;;"&gt;Line&lt;/SPAN&gt;();
&lt;SPAN style="color:&amp;quot;#40E0D0&amp;quot;;"&gt;IMeasurementTool&lt;/SPAN&gt; measurementTool = new &lt;SPAN style="color:&amp;quot;#40E0D0&amp;quot;;"&gt;MeasurementToolClass&lt;/SPAN&gt;();

measurementTool.ConstructByPoints(p1, p2);
&lt;SPAN style="color:&amp;quot;#008000&amp;quot;;"&gt;// Here we calculate distance between two points: (p1, p2)&lt;/SPAN&gt;
&lt;SPAN style="color:&amp;quot;#40E0D0&amp;quot;;"&gt;double&lt;/SPAN&gt; distance = measurementTool.Distance;

&lt;SPAN style="color:&amp;quot;#40E0D0&amp;quot;;"&gt;GeometryEnvironment&lt;/SPAN&gt; geoEnv = new &lt;SPAN style="color:&amp;quot;#40E0D0&amp;quot;;"&gt;GeometryEnvironment&lt;/SPAN&gt;();
&lt;SPAN style="color:&amp;quot;#40E0D0&amp;quot;;"&gt;IConstructAngle&lt;/SPAN&gt; angleCalculator = (&lt;SPAN style="color:&amp;quot;#40E0D0&amp;quot;;"&gt;IConstructAngle&lt;/SPAN&gt;)geoEnv;

lineForAngle.PutCoords(p1, p2);
&lt;SPAN style="color:&amp;quot;#008000&amp;quot;;"&gt;// Here we calculate angle of line between (p1, p2) and the positive x-axis&lt;/SPAN&gt;
&lt;SPAN style="color:&amp;quot;#40E0D0&amp;quot;;"&gt;double&lt;/SPAN&gt; angle = angleCalculator.ConstructLine(lineForAngle);
&lt;SPAN style="color:&amp;quot;#008000&amp;quot;;"&gt;// Convert radian to degree&lt;/SPAN&gt;
angle *= 180 / Math.PI; &lt;SPAN style="color:&amp;quot;#008000&amp;quot;;"&gt;// = &lt;SPAN style="color:&amp;quot;#FF0000&amp;quot;;"&gt;51.709836807757121&lt;/SPAN&gt; Degree&lt;/SPAN&gt;
&lt;SPAN style="color:&amp;quot;#008000&amp;quot;;"&gt;// Convert angle to azimuth (still degree)&lt;/SPAN&gt;
angle = 90 - angle;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color:&amp;quot;#008000&amp;quot;;"&gt;// = &lt;SPAN style="color:&amp;quot;#FF0000&amp;quot;;"&gt;38.290163192242879&lt;/SPAN&gt;&lt;/SPAN&gt;

&lt;SPAN style="color:&amp;quot;#008000&amp;quot;;"&gt;// Here I give first point (p1), azimuth and distance to get p2&lt;/SPAN&gt;
measurementTool.ConstructByPointDistAngle(p1, distance, angle);

geoEnv = new &lt;SPAN style="color:&amp;quot;#40E0D0&amp;quot;;"&gt;GeometryEnvironment&lt;/SPAN&gt;();
angleCalculator = (&lt;SPAN style="color:&amp;quot;#40E0D0&amp;quot;;"&gt;IConstructAngle&lt;/SPAN&gt;)geoEnv;

&lt;SPAN style="color:&amp;quot;#008000&amp;quot;;"&gt;// I put p1 and result point of measurementTool which is a point&lt;/SPAN&gt;
lineForAngle.PutCoords(p1, measurementTool.ToPoint);

&lt;SPAN style="color:&amp;quot;#008000&amp;quot;;"&gt;// Now I have calculate angle between p1 and result of measurementTool&lt;/SPAN&gt;
angle = angleCalculator.ConstructLine(lineForAngle);
angle *= 180 / Math.PI; &lt;SPAN style="color:&amp;quot;#FF0000&amp;quot;;"&gt;&lt;SPAN style="color:&amp;quot;#008000&amp;quot;;"&gt;// = &lt;/SPAN&gt;43.443603752680005&lt;/SPAN&gt;

&lt;SPAN style="color:&amp;quot;#008000&amp;quot;;"&gt;// first angle - result angle:&lt;/SPAN&gt;
&lt;SPAN style="color:&amp;quot;#FF0000&amp;quot;;"&gt;// 51.709836807757121 - 43.443603752680005 = 8.266233055077116&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To the point of your problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You use the intricate algorithm. I think it's easier to use IConstructPoint.ConstructDeflection method with the negative value of the angle (in radians) and the necessary distance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:08:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/convertion-degree-to-azimuth/m-p/98201#M2613</guid>
      <dc:creator>AlexeySubbotin</dc:creator>
      <dc:date>2021-12-11T06:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Convertion degree to azimuth</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/convertion-degree-to-azimuth/m-p/98202#M2614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;To the point of your problem.&lt;BR /&gt;You use the intricate algorithm. I think it's easier to use IConstructPoint.ConstructDeflection method with the negative value of the angle (in radians) and the necessary distance.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you a-subbotin for introducing me &lt;/SPAN&gt;&lt;STRONG&gt;IConstructPoint&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Well, I used it based on ArcObjects' Help but result point was not correct. I used &lt;/SPAN&gt;&lt;STRONG&gt;IConstructPoint.ConstructAngleDistance&lt;/STRONG&gt;&lt;SPAN&gt; but result X,Y is so large numbers! My X,Ys are longtitude,latitude and distance is meter. Do you know &lt;/SPAN&gt;&lt;STRONG&gt;ConstructAngleDistance&lt;/STRONG&gt;&lt;SPAN&gt;'s unit?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 10:09:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/convertion-degree-to-azimuth/m-p/98202#M2614</guid>
      <dc:creator>oyleiste</dc:creator>
      <dc:date>2013-04-08T10:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Convertion degree to azimuth</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/convertion-degree-to-azimuth/m-p/98203#M2615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thank you a-subbotin for introducing me &lt;STRONG&gt;IConstructPoint&lt;/STRONG&gt;.&lt;BR /&gt;Well, I used it based on ArcObjects' Help but result point was not correct. I used &lt;STRONG&gt;IConstructPoint.ConstructAngleDistance&lt;/STRONG&gt; but result X,Y is so large numbers! My X,Ys are longtitude,latitude and distance is meter. Do you know &lt;STRONG&gt;ConstructAngleDistance&lt;/STRONG&gt;'s unit?&lt;BR /&gt;Thanks&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's a map unit. So if the map's SpatialReference is IGeographicSpatialReference it should be degrees. The large numbers can represent the values of lon, lat in the IProjectedSpatialReference. Check up the spatial reference of your map to be sure in the results you obtained.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 13:52:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/convertion-degree-to-azimuth/m-p/98203#M2615</guid>
      <dc:creator>AlexeySubbotin</dc:creator>
      <dc:date>2013-04-08T13:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Convertion degree to azimuth</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/convertion-degree-to-azimuth/m-p/98204#M2616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Something worth mentioning here - useful for me in 'recomputing' DDP orientation polygons after reorienting a number of the index polys: the Minimum Bounding Geometry (MBG) tool which comes standard (for all licenses) in the Features toolset of the Data Management toolbox.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...will work on 2 point sets as in your case, if you define an ID field.&amp;nbsp; If you check the box for 'Add geometry characteristics as attributes...' then you'll have a field added that is essentially what you can easily derive azimuth from:&amp;nbsp; MBG_Orientation&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Interesting tool, because I thought it would fail with 2-point sets - instead in my test, a 'zero' width (MBG_Width = 0) polygon was constructed.&amp;nbsp; The orientation was correctly calculated in polar coordinates (clockwise from the positive X axis)...so I think that's your ticket.&amp;nbsp; (If you want the measure from the North axis, subtract 90 degrees.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wayne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 14:44:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/convertion-degree-to-azimuth/m-p/98204#M2616</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-04-08T14:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Convertion degree to azimuth</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/convertion-degree-to-azimuth/m-p/98205#M2617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;to &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;a-subbotin&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry, I didn't get what to do. How can I make &lt;/SPAN&gt;&lt;STRONG&gt;ConstructAngleDistance&lt;/STRONG&gt;&lt;SPAN&gt; function to use longtitude, latitude and meter? Can you please explain more or give me example code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;Wayne_Whitley&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately I can't use toolboxes. I should implement it using .NET code. If you could help me on &lt;/SPAN&gt;&lt;STRONG&gt;ConstructAngleDistance&lt;/STRONG&gt;&lt;SPAN&gt;, that would be great.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually I subtract 90 degrees; as you see:&lt;/SPAN&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;angle = 90 - angle;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;but I don't get correct angle.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 09:39:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/convertion-degree-to-azimuth/m-p/98205#M2617</guid>
      <dc:creator>oyleiste</dc:creator>
      <dc:date>2013-04-10T09:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Convertion degree to azimuth</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/convertion-degree-to-azimuth/m-p/98206#M2618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;to &lt;SPAN style="font-style:italic;"&gt;a-subbotin&lt;/SPAN&gt;:&lt;BR /&gt;Sorry, I didn't get what to do. How can I make &lt;STRONG&gt;ConstructAngleDistance&lt;/STRONG&gt; function to use longtitude, latitude and meter? Can you please explain more or give me example code?&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;to &lt;SPAN style="font-style:italic;"&gt;Wayne_Whitley&lt;/SPAN&gt;:&lt;BR /&gt;Thank you for your reply.&lt;BR /&gt;Unfortunately I can't use toolboxes. I should implement it using .NET code. If you could help me on &lt;STRONG&gt;ConstructAngleDistance&lt;/STRONG&gt;, that would be great.&lt;BR /&gt;Actually I subtract 90 degrees; as you see:&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;angle = 90 - angle;&lt;/PRE&gt;&lt;BR /&gt;but I don't get correct angle.&lt;BR /&gt;Thanks&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok, Oyle. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. What kind of the application are you developing? Is it a standalone application or it is executed in the ArcGIS application (ArcMap, ArcGlobe etc.)? If it's a standalone application you can use any spatial reference with it. If it's executed in the ArcGIS you should remember that the spatial reference of the app's map will be used in the processing as it specifies the distance units and the angular units. By default the polar angles are used in ArcGIS.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. All of the geometries you process do not have the assigned spatial reference. It should be assigned to prevent unexpected results of calculations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. As i've said earlier, you use the intricate algorithm at all. The angle of the line object can be retrieved through it's Angle property value (the angle in radians between the line and the positive x-axis). The length can be retrieved in the same way through it's&amp;nbsp; Length property value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But all you need is to obtain a new point with necessary coordinates through the call of the IConstructPoint.ConstructDeflection method with the angle and the distance. The value of the distance parameter is the length of the line. The value of the angle parameter should be the angle in radians i.e. 30*Math.PI/18&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 09:01:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/convertion-degree-to-azimuth/m-p/98206#M2618</guid>
      <dc:creator>AlexeySubbotin</dc:creator>
      <dc:date>2013-04-11T09:01:22Z</dc:date>
    </item>
  </channel>
</rss>

