<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Carlos;</p>
    <p>It seems you have the calculation of azimuth figured out.  I
      would generate a new filed in the attribute table and use the
      field calculator to calculate your bearings. If you are
      comfortable with python, you can create a script as well. <br>
    </p>
    <p> If you are using a projected coordinate system, take note that
      North would be actually be grid north and your calculate azimuth
      would be in relation to it.  If you want to reference actual true
      north, you would have to calculate the convergence between true
      and grid north for your project area.  If you want the coordinates
      referencing magnetic north (perhaps for field work), then you
      would also have to calculate the magnetic declination for your
      project.</p>
    <p>     Kirk Schmidt<br>
    </p>
    <div class="moz-cite-prefix">On 4/8/2021 6:30 PM, Sebastian Gutwein
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAED_52oVRhSg==7XED8rq6mLC_cW49AEOiE-_9tGOPzT6VYYJw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Carlos-
        <div>Interesting problem- </div>
        <div>You might get better responses on stack exchange. </div>
        <div>I have the same confusion as Ujaval. Each side of your
          polygon will have a different bearing. </div>
        <div>If all you care about is the average angle then you can use
          this expression  main_angle( $geometry) </div>
        <div>This will return azimuth of the polygon in degrees from
          north. </div>
        <div>I don't know how to convert this to bearing in QGIS. </div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Thu, Apr 8, 2021 at 3:28 PM
          carlos h <<a href="mailto:carloslda256@gmail.com"
            moz-do-not-send="true">carloslda256@gmail.com</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">
            <div dir="ltr"><br>
            </div>
            <div dir="ltr">  Hello, for example have this in the
              attribute table:</div>
            <div dir="ltr">  <br>
              <a href="https://ibb.co/wWn4PfM" target="_blank"
                moz-do-not-send="true">https://ibb.co/wWn4PfM</a></div>
            <div dir="ltr"><br>
            </div>
            <div dir="ltr">What I need is to have the bearing in the
              polygon's attribute table.<br>
              <br>
                Thanks</div>
            <div dir="ltr"><br>
            </div>
            <div>CA  </div>
            <div><br>
            </div>
            <img alt="" style="display: flex;" moz-do-not-send="true"
              width="0" height="0">
            <div class="gmail_quote">
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
                0.8ex;border-left:1px solid
                rgb(204,204,204);padding-left:1ex">
                <div dir="ltr">
                  <div dir="ltr">
                    <div><br>
                      <br>
                    </div>
                  </div>
                  <br>
                  <img
                    src="cid:part4.F4F7892F.BFCB0155@nortekresources.com"
                    alt="image.gif" class="" width="1" height="1"><br>
                  <div class="gmail_quote">
                    <div dir="ltr" class="gmail_attr">El jue, 8 abr 2021
                      a las 10:49, Ujaval Gandhi (<<a
                        href="mailto:ujaval@spatialthoughts.com"
                        target="_blank" moz-do-not-send="true">ujaval@spatialthoughts.com</a>>)
                      escribió:<br>
                    </div>
                    <blockquote class="gmail_quote" style="margin:0px
                      0px 0px 0.8ex;border-left:1px solid
                      rgb(204,204,204);padding-left:1ex">
                      <div dir="ltr">Can you elaborate with an example?
                        It's not clear what the bearing would be for a
                        polygon.<br clear="all">
                        <div>
                          <div dir="ltr">
                            <div dir="ltr">
                              <div>
                                <div dir="ltr">
                                  <div>
                                    <div dir="ltr">
                                      <div>
                                        <div dir="ltr">
                                          <div dir="ltr">
                                            <div dir="ltr">
                                              <div>
                                                <table
style="border-spacing:0px;border-collapse:collapse;color:rgb(68,68,68);width:480px;font-size:10pt;font-family:Arial,sans-serif;line-height:normal"
                                                  cellspacing="0"
                                                  cellpadding="0">
                                                  <tbody>
                                                    <tr>
                                                      <td
                                                        style="padding:10px
                                                        0px
                                                        12px;width:160px;vertical-align:top"
                                                        valign="top"><a
href="https://spatialthoughts.com/"
                                                          style="background-color:transparent;color:rgb(51,122,183)"
target="_blank" moz-do-not-send="true"><img alt="Logo" style="border:
                                                          0px;
                                                          vertical-align:
                                                          middle; width:
                                                          141px; height:
                                                          auto;"
                                                          moz-do-not-send="true"
                                                          width="141"
                                                          border="0"></a></td>
                                                      <td
                                                        style="padding:6px
                                                        0px;width:320px">
                                                        <table
style="border-spacing:0px;border-collapse:collapse;background-color:transparent"
cellspacing="0" cellpadding="0">
                                                          <tbody>
                                                          <tr>
                                                          <td
style="padding:0px;font-size:12pt;font-family:Arial,sans-serif;font-weight:bold;color:rgb(61,60,63)"><span
style="color:rgb(0,175,239)">Ujaval Gandhi</span></td>
                                                          </tr>
                                                          <tr>
                                                          <td
                                                          style="padding:0px
                                                          0px
                                                          11px;font-size:10pt;font-family:Arial,sans-serif;color:rgb(61,60,63)"><span
style="color:rgb(0,175,239)">Spatial Thoughts</span></td>
                                                          </tr>
                                                          <tr>
                                                          <td
style="padding:0px;font-size:10pt;font-family:Arial,sans-serif;color:rgb(155,155,155)"><span>mobile:
                                                          +91-8095684687</span></td>
                                                          </tr>
                                                          <tr>
                                                          <td
style="padding:0px;font-size:10pt;font-family:Arial,sans-serif;color:rgb(155,155,155)"><span>email: </span><span
style="color:rgb(23,147,210)"><a
                                                          href="mailto:ujaval@spatialthoughts.com"
target="_blank" moz-do-not-send="true">ujaval@spatialthoughts.com</a></span></td>
                                                          </tr>
                                                          <tr>
                                                          <td
                                                          style="padding:6px
                                                          0px 0px"><span
style="display:inline-block;height:22px"><span><a
                                                          href="https://www.linkedin.com/in/spatialthoughts/"
style="background-color:transparent;color:rgb(51,122,183)"
                                                          target="_blank"
moz-do-not-send="true"><img alt="LinkedIn icon" style="border: 0px;
                                                          vertical-align:
                                                          middle;
                                                          height: 20px;
                                                          width: 20px;"
moz-do-not-send="true" width="23" height="23" border="0"></a>  </span><span><a
href="https://twitter.com/spatialthoughts"
                                                          style="background-color:transparent;color:rgb(51,122,183)"
target="_blank" moz-do-not-send="true"><img alt="Twitter icon"
                                                          style="border:
                                                          0px;
                                                          vertical-align:
                                                          middle;
                                                          height: 20px;
                                                          width: 20px;"
moz-do-not-send="true" width="23" height="23" border="0"></a>  </span></span></td>
                                                          </tr>
                                                          </tbody>
                                                        </table>
                                                      </td>
                                                    </tr>
                                                    <tr>
                                                      <td colspan="2"
                                                        style="padding:8px
                                                        0px
                                                        0px;border-top:1px
                                                        solid
rgb(23,147,210);width:480px;font-family:Arial,sans-serif;color:rgb(155,155,155);text-align:justify"><br>
                                                      </td>
                                                    </tr>
                                                  </tbody>
                                                </table>
                                                <br>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                        <br>
                      </div>
                      <br>
                      <div class="gmail_quote">
                        <div dir="ltr" class="gmail_attr">On Thu, Apr 8,
                          2021 at 8:50 PM carlos h <<a
                            href="mailto:carloslda256@gmail.com"
                            target="_blank" moz-do-not-send="true">carloslda256@gmail.com</a>>
                          wrote:<br>
                        </div>
                        <blockquote class="gmail_quote"
                          style="margin:0px 0px 0px
                          0.8ex;border-left:1px solid
                          rgb(204,204,204);padding-left:1ex">
                          <div dir="ltr"><br>
                            Hello, nice to write here.<br>
                            <br>
                            How can I generate the bearing in the
                            attribute table of a polygon? the bearing
                            not in azimuth, but for example N30E etc<br>
                            <br>
                            Thanks<br>
                            <br>
                            CA<br>
                            <br>
                            <br>
                            <img
                              src="cid:part4.F4F7892F.BFCB0155@nortekresources.com"
                              alt="image.gif" class="" width="1"
                              height="1"><br>
                          </div>
_______________________________________________<br>
                          Qgis-user mailing list<br>
                          <a href="mailto:Qgis-user@lists.osgeo.org"
                            target="_blank" moz-do-not-send="true">Qgis-user@lists.osgeo.org</a><br>
                          List info: <a
                            href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
                            rel="noreferrer" target="_blank"
                            moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
                          Unsubscribe: <a
                            href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
                            rel="noreferrer" target="_blank"
                            moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
                        </blockquote>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </blockquote>
            </div>
            <br>
          </div>
          _______________________________________________<br>
          Qgis-user mailing list<br>
          <a href="mailto:Qgis-user@lists.osgeo.org" target="_blank"
            moz-do-not-send="true">Qgis-user@lists.osgeo.org</a><br>
          List info: <a
            href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
            rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
          Unsubscribe: <a
            href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
            rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Kirk Schmidt, MScF, BScF, RPF
General Manager
Nortek Resource Solutions Inc.
RR # 1
Thorburn, NS
B0K 1W0
Tel (902) 922.3607
Email: <a class="moz-txt-link-abbreviated" href="mailto:kirk@nortekresources.com">kirk@nortekresources.com</a>
Web: <a class="moz-txt-link-abbreviated" href="http://www.nortekresources.com">www.nortekresources.com</a></pre>
  </body>
</html>