<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hey Bruno,<br>
      <br>
      in a version before 0.3 it was hard to find out the orientation of
      *an edge* as for bidirectional algorithms there is a forward and
      backward search going on. Maybe a solution via your "baseNode <
      adjNode" check is the only one.<br>
      <br>
      *But* now that I better understand your use case ... to find out
      how the original *OSM way* (not the edge) is oriented is
      impossible as we "forget" this information while import. What do
      you want to achieve with this or what information relies on the
      original OSM way orientation?<br>
      <br>
      Regards,<br>
      Peter.<br>
      <br>
      <br>
    </div>
    <blockquote
cite="mid:CANsAejWUYS-S+M6p2tPG9pQaB-JdSo_Mo+ADBPO3LTz6RQiWVg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>Hi,<br>
                The reverseNavigation flag is meant to tell me if the
                edge passed as parameter<br>
              </div>
              will be used in the path returned by route() in the same
              direction as the edge's way in the OSM file, or in the
              reverse direction.<br>
              <br>
            </div>
            I use this information in order to apply the overrides that
            we implemented at Rinkai.<br>
            <br>
            From what I understood in yesterday's discussion, in the
            current release there is already such a flag beeing passed
            to the weighting function, but I am using a cloned
            repository which was last merged march 17.<br>
          </div>
          <div><br>
          </div>
          Thanks<br>
        </div>
        Bruno<br>
        <div>
          <div>
            <div>
              <div><br>
                <div>
                  <div>
                    <div><br>
                      <div><br>
                        ----- Forwarded Message -----<br>
                        <div class="gmail_quote">
                          Sent: Wednesday, June 11, 2014 4:27 PM<br>
                          Subject: Re: Detecting the orientation of an
                          edge against the orientation of the way in OSM<br>
                          <br>
                          Hey Bruno,<br>
                          <br>
                          looks like my mail in <a
                            moz-do-not-send="true"
                            href="http://yahoo.de" target="_blank">yahoo.de</a>
                          does not like message from your <a
                            moz-do-not-send="true"
                            href="http://yahoo.com" target="_blank">yahoo.com</a><br>
                          ;) hope they'll resolve this somehow. (for now
                          keep me in CC)<br>
                          <br>
                          What do you want to achieve with
                          reverseNavigation?<br>
                          <br>
                          The reverse variable is necessary if the
                          backward search is going on -<br>
                          e.g. you need to call edge.getReverseSpeed. So
                          I guess you just need<br>
                          reverseNavigation=reverse but not sure ...<br>
                          <br>
                          Regards,<br>
                          Peter.<br>
                          <br>
                          <br>
                          <br>
                          <br>
                          > Hi,<br>
                          > I have some code to override the edge's
                          weight depending on the orientation of the way
                          in OSM. Please could you tell me if the
                          snippet below is correctly detecting the
                          orientation of the edge against the
                          orientation of the way in OSM? My doubt is
                          mainly for the first statement reverseEdge=...<br>
                          ><br>
                          > public double calcWeight(
                          EdgeIteratorState edge, boolean reverse )  {<br>
                          >     ...<br>
                          >     // is the edge in the same direction
                          as way in OSM<br>
                          ><br>
                          >     boolean
                          reverseEdge=edgeIteratorState.getBaseNode()
                          <edgeIteratorState.getAdjNode();<br>
                          >     ...<br>
                          ><br>
                          >     // compare reverseEdge and reverse to
                          figure out if we are navigating the edge
                          forward<br>
                          ><br>
                          >     // or backward according to way in
                          OSM<br>
                          >     boolean
                          reverseNavigation=reverseEdge!=reverse;<br>
                          >     ...<br>
                          ><br>
                          > Thanks!<br>
                          > Bruno   <br>
                          ><br>
                          <span class=""><font color="#888888"><br>
                              <br>
                              --<br>
                              GraphHopper.com - Fast & Flexible Road
                              Routing</font></span></div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
GraphHopper mailing list
<a class="moz-txt-link-abbreviated" href="mailto:GraphHopper@openstreetmap.org">GraphHopper@openstreetmap.org</a>
<a class="moz-txt-link-freetext" href="https://lists.openstreetmap.org/listinfo/graphhopper">https://lists.openstreetmap.org/listinfo/graphhopper</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>