<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Peter,<div><br></div><div>As I already mentioned earlier, I have a custom FlagEncoder that imports only a subset of osm ways. It imports only very few ways with only ~10 different flags overall. My assumption was now I could somehow get a graph from intersection to intersection (or at flags changes) but of course the names differ often between intersections (keep in mind that most edges are dropped, so there are not many intersections left). Hence names were my first guess where to start.</div><div><br></div><div>I only need the graph. It has nothing to do with the (graphhopper) routing.</div><div><br></div><div>Jan</div><div><br></div><div><br><div><div>Am 03.06.2015 um 10:52 schrieb Peter <<a href="mailto:graphhopper@gmx.de">graphhopper@gmx.de</a>>:</div><br class="Apple-interchange-newline"><blockquote type="cite">
  
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Jan,<br>
      <br>
      > Do you have a suggestion how I could do that?<br>
      <br>
      That won't be easy without knowning what you intend to do. E.g.
      barriers, different speeds or changing flags due to changed
      tagging on the street: all will lead to 2 degree nodes. Different
      names is probably only a minor thing as streets change names 'in
      the middle of a street'.<br>
      <br>
      A simple post-processing procedure for your case could be to
      create additional direct edges from junction to junction where you
      found a 2 degree node and mark the other edges as inaccessible.<br>
      <br>
      Kind Regards,<br>
      Peter<br>
      <br>
      On 03.06.2015 10:24, Jan Torben Heuer wrote:<br>
    </div>
    <blockquote cite="mid:D91B57CA-F77E-4F9F-B2E3-CD3C30E44C49@komoot.de" type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      Hi Peter, 
      <div><br>
      </div>
      <div>If there is already a merging logic, then I would  ‚only‘
        have to disable the name parsing or nameIndex? Do you have a
        suggestion how I could do that? (If that is too difficult I
        could also remove all name tags from the osm file, I think).</div>
      <div><br>
      </div>
      <div>Just to be clear, my question has nothing to do with saving
        memory and stuff. That topic was brought up by ZhiQiang ZHAO. I
        just need a graph with edges from intersection to intersection.</div>
      <div><br>
      </div>
      <div>Thanks,</div>
      <div><br>
      </div>
      <div>Jan</div>
      <div><br>
      </div>
      <div><br>
        <div>
          <div>Am 03.06.2015 um 09:09 schrieb Peter <<a moz-do-not-send="true" href="mailto:graphhopper@gmx.de">graphhopper@gmx.de</a>>:</div>
          <br class="Apple-interchange-newline">
          <blockquote type="cite">
            <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
            <div bgcolor="#FFFFFF" text="#000000">
              <div class="moz-cite-prefix">Hi Jan,<br>
                <br>
                we do this kind of 'merging' logic already in the import
                step when deciding what should be handled as tower node
                and what is a pillar node. Otherwise you'll need as
                twice as many RAM when copying from one graph to the
                other.<br>
                <br>
                <div><br>
                </div>
                <div>> Have you made a experiment to count the number
                  of 2 degree nodes with the equal flags and name in
                  OSM?</div>
                <div>> And then we can know how many edges we can
                  save.<br>
                  <br>
                  Yes, this should be done before implementing it :)<br>
                  <br>
                  And as the merging logic is currently not 100%
                  optimal, there could be some minor savings even when
                  recognizing the different street names, but I'm unsure
                  if it is worth the effort.<br>
                  <br>
                  Issues like #234 or #111 will probably make more
                  difference.<br>
                </div>
                <br>
                Kind Regards,<br>
                Peter<br>
                <br>
                On 02.06.2015 22:35, John Zhao wrote:<br>
              </div>
              <blockquote cite="mid:CA+EBg9TmxF0pFgaq6964fqfWhsx0TTATK=gNXTE_FAZMXY9hKA@mail.gmail.com" type="cite">
                <div dir="ltr">Hi,
                  <div><br>
                  </div>
                  <div>AFAIK, there is no this kind of merging logic
                    here.</div>
                  <div>Wait the answer from Peter.</div>
                  <div>Probably you need to implement it by your own.</div>
                  <div>And it's not easy. </div>
                  <div>Maybe can be done before import?</div>
                  <div>What you want, is actually convert a tower node
                    to a pillar node.</div>
                  <div><br>
                  </div>
                </div>
                <div class="gmail_extra"><br clear="all">
                  <div>
                    <div class="gmail_signature"><b>Best Regards,</b>
                      <div><b>ZhiQiang ZHAO</b></div>
                    </div>
                  </div>
                  <br>
                  <div class="gmail_quote">On Tue, Jun 2, 2015 at 1:27
                    PM, Jan Torben Heuer <span dir="ltr"><<a moz-do-not-send="true" href="mailto:jan@komoot.de" target="_blank">jan@komoot.de</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div style="word-wrap:break-word">Hi ZhiQiang
                        ZHAO,
                        <div><br>
                        </div>
                        <div>Thanks for your quick answer.</div>
                        <div>I have a custom FlagEncoder that imports
                          only very few ways and I don’t need the names.
                          I guess, I have mostly nodes with a degree of
                          two.</div>
                        <span class="HOEnZb"><font color="#888888">
                            <div><br>
                            </div>
                            <div>Jan</div>
                          </font></span>
                        <div>
                          <div class="h5">
                            <div><br>
                              <div>
                                <div>Am 02.06.2015 um 21:53 schrieb John
                                  Zhao <<a moz-do-not-send="true" href="mailto:johnthu@gmail.com" target="_blank">johnthu@gmail.com</a>>:</div>
                                <br>
                                <blockquote type="cite">
                                  <div dir="ltr">Hi,
                                    <div><br>
                                    </div>
                                    <div>Have you made a experiment to
                                      count the number of 2 degree nodes
                                      with the equal flags and name in
                                      OSM?</div>
                                    <div>And then we can know how many
                                      edges we can save.</div>
                                    <div><br>
                                    </div>
                                    <div>I doubt this should be not too
                                      much for OSM.</div>
                                  </div>
                                  <div class="gmail_extra"><br clear="all">
                                    <div>
                                      <div><b>Best Regards,</b>
                                        <div><b>ZhiQiang ZHAO</b></div>
                                      </div>
                                    </div>
                                    <br>
                                    <div class="gmail_quote">On Tue, Jun
                                      2, 2015 at 11:59 AM, Jan Torben
                                      Heuer <span dir="ltr"><<a moz-do-not-send="true" href="mailto:jan@komoot.de" target="_blank">jan@komoot.de</a>></span>
                                      wrote:<br>
                                      <blockquote class="gmail_quote" style="margin:0 0 0
                                        .8ex;border-left:1px #ccc
                                        solid;padding-left:1ex">Hi,<br>
                                        <br>
                                        Can Graphhopper merge two ways
                                        with equal flags and name if
                                        there is no intersection between
                                        them (no third way connected)?<br>
                                        <br>
                                        I would like to create a very
                                        reduces graph with only few
                                        edges. What would be the easiest
                                        way to achieve it? I think I
                                        would have to disable the
                                        nameIndex for instance.<br>
                                        <br>
                                        Thanks,<br>
                                        <br>
                                        Jan<br>
                                        <br>
                                      </blockquote>
                                    </div>
                                  </div>
                                </blockquote>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </blockquote>
              <br>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <br>
  </div>

_______________________________________________<br>GraphHopper mailing list<br><a href="mailto:GraphHopper@openstreetmap.org">GraphHopper@openstreetmap.org</a><br>https://lists.openstreetmap.org/listinfo/graphhopper<br></blockquote></div><br></div></body></html>