<?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: How do we find out the angle of a geometry (Rectangle) on a map. in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/how-do-we-find-out-the-angle-of-a-geometry/m-p/435260#M5266</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's nothing out of the box, but you have everything needed to use a little trigonometry and math to figure out where the 4 vertices go.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Aug 2017 15:46:51 GMT</pubDate>
    <dc:creator>dotMorten_esri</dc:creator>
    <dc:date>2017-08-24T15:46:51Z</dc:date>
    <item>
      <title>How do we find out the angle of a geometry (Rectangle) on a map.</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-do-we-find-out-the-angle-of-a-geometry/m-p/435257#M5263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Trying to find out if it is possible to find out angle of a geometry: Rectangle geometry in my case.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bikesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2017 16:45:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-do-we-find-out-the-angle-of-a-geometry/m-p/435257#M5263</guid>
      <dc:creator>BikeshMaharjan1</dc:creator>
      <dc:date>2017-08-23T16:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do we find out the angle of a geometry (Rectangle) on a map.</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-do-we-find-out-the-angle-of-a-geometry/m-p/435258#M5264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A polygon doesn't really have an "angle". You could make the assumption that if your polygon has 4 vertices, it's a rectangle. Then you need to make an assumption about which vertex is at which index (ie if it's rotated 0 degrees, is index 0 the lower-left vertex?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you do that, you could take two consecutive vertices and use trigonometry to calculate an angle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you would end up with something along the lines of this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MapPoint firstVertex = polygon.Parts[0][0].StartPoint;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MapPoint secondVertex = polygon.Parts[0][0].EndPoint;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double xDiff = secondVertex.X - firstVertex.X;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double yDiff = secondVertex.Y - firstVertex.Y;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double angle =&amp;nbsp; Math.Atan2(yDiff, xDiff) * 180.0 / Math.PI;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2017 18:14:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-do-we-find-out-the-angle-of-a-geometry/m-p/435258#M5264</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2017-08-23T18:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do we find out the angle of a geometry (Rectangle) on a map.</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-do-we-find-out-the-angle-of-a-geometry/m-p/435259#M5265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Morten. That was really helpful. Do you know if there is a way to draw a rectangle given just length, width, centerpoint of rectangle and may be angle?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bikesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 15:17:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-do-we-find-out-the-angle-of-a-geometry/m-p/435259#M5265</guid>
      <dc:creator>BikeshMaharjan1</dc:creator>
      <dc:date>2017-08-24T15:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do we find out the angle of a geometry (Rectangle) on a map.</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-do-we-find-out-the-angle-of-a-geometry/m-p/435260#M5266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's nothing out of the box, but you have everything needed to use a little trigonometry and math to figure out where the 4 vertices go.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 15:46:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-do-we-find-out-the-angle-of-a-geometry/m-p/435260#M5266</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2017-08-24T15:46:51Z</dc:date>
    </item>
  </channel>
</rss>

