<div dir="ltr">I think i was wrong, i'm calling <div><div>                tmpHopp.disableCHShortcuts();</div></div><div>so i guess i'm not using the CH !?!?</div><div><br></div><div>I still didnt get the <span style="font-family:arial,sans-serif;font-size:13.333333969116211px">VisitedNodes, i found the class but i still didnt get access to create the log</span></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 20, 2013 at 3:11 PM, Bruno Marques <span dir="ltr"><<a href="mailto:baamarques@gmail.com" target="_blank">baamarques@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes, i'm using CH.<div>I will look for that info, the visitedNodes, I will post more info when I get the logs</div>
<div><br></div><div>thanks</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">
On Fri, Dec 20, 2013 at 1:18 PM, Peter K <span dir="ltr"><<a href="mailto:peathal@yahoo.de" target="_blank">peathal@yahoo.de</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>There is not enough memory to do the
      rehash of the internally used HashMap. It could be that the Dalvik
      is not releasing it fast enough (which could be slightly
      workarounded via reusing the datastructures of Dijkstra).<br>
      <br>
      Are you using CH? And can you log or find out somehow the
      visitedNodes of the dijkstra algorithm?
      dijkstraBidirectionRef.getVisitedNodes()<br>
      <br>
      Regards,<br>
      Peter.<br>
      <br>
    </div><div><div>
    <blockquote type="cite">
      <div dir="ltr">I'm calculating several paths between a few points
        of interest, i think i'm having problems with leaking memory or
        somthing
        <div>With the log, can you see if some problem with the gh? or
          if its some problem with my proj</div>
        <div><br>
        </div>
        <div>
          <div>12-20 11:03:24.669: E/dalvikvm-heap(10791): Out of memory
            on a 7830620-byte allocation.</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791): "AsyncTask #3"
            prio=5 tid=15 RUNNABLE</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   | group="main"
            sCount=0 dsCount=0 obj=0x40774ff0 self=0x3ddfd8</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   | sysTid=10921
            nice=10 sched=3/0 cgrp=default handle=3422784</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   | schedstat=(
            34916079000 976208000 2523 )</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   at
            gnu.trove.map.hash.TIntObjectHashMap.rehash(TIntObjectHashMap.java:~157)</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   at
            gnu.trove.impl.hash.THash.postInsertHook(THash.java:388)</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   at
            gnu.trove.map.hash.TIntObjectHashMap.doPut(TIntObjectHashMap.java:248)</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   at
            gnu.trove.map.hash.TIntObjectHashMap.put(TIntObjectHashMap.java:222)</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   at
com.graphhopper.routing.DijkstraBidirectionRef.fillEdges(DijkstraBidirectionRef.java:160)</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   at
com.graphhopper.routing.DijkstraBidirectionRef.fillEdgesFrom(DijkstraBidirectionRef.java:200)</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   at
com.graphhopper.routing.DijkstraBidirectionRef.calcPath(DijkstraBidirectionRef.java:106)</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   at
            com.graphhopper.GraphHopper.route(GraphHopper.java:615)</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   at
com.graphhopper.android.MainActivity$9.doInBackground(MainActivity.java:618)</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   at
com.graphhopper.android.MainActivity$9.doInBackground(MainActivity.java:1)</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   at
            android.os.AsyncTask$2.call(AsyncTask.java:185)</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   at
            java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   at
            java.util.concurrent.FutureTask.run(FutureTask.java:138)</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)</div>
          <div>12-20 11:03:24.669: I/dalvikvm(10791):   at
            java.lang.Thread.run(Thread.java:1019)</div>
          <div>12-20 11:03:24.669: W/dalvikvm(10791): threadid=15:
            thread exiting with uncaught exception (group=0x4001d560)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): FATAL
            EXCEPTION: AsyncTask #3</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791):
            java.lang.RuntimeException: An error occured while executing
            doInBackground()</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
            android.os.AsyncTask$3.done(AsyncTask.java:200)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
            java.util.concurrent.FutureTask.setException(FutureTask.java:125)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
            java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
            java.util.concurrent.FutureTask.run(FutureTask.java:138)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
            java.lang.Thread.run(Thread.java:1019)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): Caused by:
            java.lang.OutOfMemoryError</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
            gnu.trove.map.hash.TIntObjectHashMap.rehash(TIntObjectHashMap.java:157)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
            gnu.trove.impl.hash.THash.postInsertHook(THash.java:388)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
            gnu.trove.map.hash.TIntObjectHashMap.doPut(TIntObjectHashMap.java:248)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
            gnu.trove.map.hash.TIntObjectHashMap.put(TIntObjectHashMap.java:222)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
com.graphhopper.routing.DijkstraBidirectionRef.fillEdges(DijkstraBidirectionRef.java:160)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
com.graphhopper.routing.DijkstraBidirectionRef.fillEdgesFrom(DijkstraBidirectionRef.java:200)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
com.graphhopper.routing.DijkstraBidirectionRef.calcPath(DijkstraBidirectionRef.java:106)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
            com.graphhopper.GraphHopper.route(GraphHopper.java:615)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
com.graphhopper.android.MainActivity$9.doInBackground(MainActivity.java:618)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
com.graphhopper.android.MainActivity$9.doInBackground(MainActivity.java:1)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
            android.os.AsyncTask$2.call(AsyncTask.java:185)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>at
            java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)</div>
          <div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span style="white-space:pre-wrap"> </span>... 4 more</div>
          <div>12-20 11:03:33.827: D/dalvikvm(10791): GC_EXPLICIT freed
            26435K, 89% free 3654K/32519K, external 4397K/5491K, paused
            147ms</div>
        </div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Tue, Dec 17, 2013 at 10:47 PM, Ignas
          Kapočius <span dir="ltr"><<a href="mailto:kapocius.ignas@gmail.com" target="_blank">kapocius.ignas@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">
              <div>What a fool of me - I somehow managed to mistaken
                folders while copying them and there were
                edges/geometry/etc files on my android device.</div>
              <div><br>
              </div>
              <div>Sorry for all this spam and thank you for your help
                again!</div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div><br>
              </div>
            </div>
            <div class="gmail_extra"><br clear="all">
              <div>
                <div>----------------------</div>
                <div><br>
                </div>
                <div>Ignas Kapočius</div>
                <div><br>
                </div>
              </div>
              <br>
              <br>
              <div class="gmail_quote">2013/12/17 Peter K <span dir="ltr"><<a href="mailto:peathal@yahoo.de" target="_blank">peathal@yahoo.de</a>></span><br>
                <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  <div>
                    <div>
                      <div bgcolor="#FFFFFF" text="#000000">
                        <div> without a log file or more info of how
                          your code looks like we probably won't be able
                          to help you :)<br>
                          <br>
                          Regards,<br>
                          Peter.<br>
                          <br>
                        </div>
                        <div>
                          <div>
                            <blockquote type="cite">
                              <div dir="ltr">I'll look into that, thank
                                you! 
                                <div><br>
                                </div>
                                <div>What about extracting routing data
                                  for a specific city? </div>
                                <div>I've tried using bbike <a href="http://download.bbbike.org/osm/" target="_blank">http://download.bbbike.org/osm/</a>
                                  , extracted this:  <a href="http://download.bbbike.org/osm/extract/planet_25.1591,54.6528_25.3957,54.752.osm.pbf" style="font-size:13px;font-family:arial,sans-serif" target="_blank">http://download.bbbike.org/osm/extract/planet_25.1591,54.6528_25.3957,54.752.osm.pbf</a> (Vilnius

                                  city, Lithuania) and executed
                                  ./graphopper.sh import
                                  vilnius-city-latest.osm.pmf</div>
                                <div><br>
                                </div>
                                <div>Then I've downloaded Lithuania map
                                  from here <a href="http://download.mapsforge.org/maps/europe/" target="_blank">http://download.mapsforge.org/maps/europe/</a>
                                  , created folder
                                  vilnius-city-latest-gh and pasted it
                                  into Android file system. </div>
                                <div><br>
                                </div>
                                <div>When I run app it displays a map
                                  but when I try calculate distance
                                  between two points (with your methods)
                                  app crashes. </div>
                                <div><br>
                                </div>
                                <div>Then i've tested it with australia
                                  map and it's routing data and it
                                  works. So I'm guessing I have some
                                  problems with routing data that I've
                                  got from bbbike and I've no idea how
                                  else to extract correct routing data. </div>
                                <div><br>
                                </div>
                                <div>  </div>
                              </div>
                              <div class="gmail_extra"><br clear="all">
                                <div>
                                  <div>----------------------</div>
                                  <div><br>
                                  </div>
                                  <div>Ignas Kapočius</div>
                                  <div><br>
                                  </div>
                                </div>
                                <br>
                                <br>
                                <div class="gmail_quote">2013/12/17
                                  Peter K <span dir="ltr"><<a href="mailto:peathal@yahoo.de" target="_blank">peathal@yahoo.de</a>></span><br>
                                  <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                    <div bgcolor="#FFFFFF" text="#000000">
                                      <div>Hi Ignas,<br>
                                        <br>
                                        have a look into the android/
                                        folder. There you see how it
                                        work. And you can set the
                                        algorithm in the GHRequest
                                        object. If contraction hierarchy
                                        is enabled only bidirectional
                                        algorithms will work. The
                                        GHResponse contains all the
                                        necessary information like
                                        points and instructions.<br>
                                        <br>
                                        <div>
                                          <div>> Should I first make
                                            some kind of subgraph (due
                                            to efficiency)?<br>
                                            <br>
                                          </div>
                                          There are several techniques
                                          to make it faster like CH, but
                                          you could also use more
                                          heuristical routing
                                          algorithms, sorting the graph,
                                          in-memory instead memory
                                          mapped etc<br>
                                        </div>
                                        <br>
                                        Regards,<br>
                                        Peter.<br>
                                        <br>
                                      </div>
                                      <blockquote type="cite">
                                        <div>
                                          <div>
                                            <div dir="ltr">Hello, 
                                              <div><br>
                                              </div>
                                              <div>I've got Graphhopper
                                                going on my Android
                                                device. </div>
                                              <div><br>
                                              </div>
                                              <div>Now my goal is to
                                                select two points on the
                                                map, apply one of the
                                                algorithms (Dijksta, A*,
                                                etc) and display results
                                                with an overlay. </div>
                                              <div><br>
                                              </div>
                                              <div>Due to lack of
                                                documentation &
                                                being a little bit in a
                                                hurry, could somebody
                                                point me where/how to
                                                start? </div>
                                              <div><br>
                                              </div>
                                              <div>I understand the
                                                basics - getting point's
                                                coordinates, displaying
                                                an overlay with results.
                                                The part where I'm
                                                confused is how to apply
                                                search algorithms in
                                                Graphhopper? </div>
                                              <div><br>
                                              </div>
                                              <div>Should I first make
                                                some kind of subgraph
                                                (due to efficiency)? </div>
                                              <div>How can I get all the
                                                points (on streets,
                                                i.e.) between those two
                                                points?</div>
                                              <div>Is there something
                                                like getStreet(point1,
                                                point2) that gives you
                                                back most likely street
                                                between your two
                                                points? </div>
                                              <div><br>
                                              </div>
                                              <div>Pardon my naivety,
                                                but I'm new to mapping,
                                                routing, etc & my BA
                                                thesis' handing in
                                                deadline is coming
                                                really fast. ;) any help
                                                appreciated!<br clear="all">
                                                <div>
                                                  <div>----------------------</div>
                                                  <div><br>
                                                  </div>
                                                  <div>Ignas Kapočius</div>
                                                  <div><br>
                                                  </div>
                                                </div>
                                              </div>
                                            </div>
                                            <br>
                                          </div>
                                        </div>
                                      </blockquote>
                                    </div>
                                  </blockquote>
                                </div>
                              </div>
                            </blockquote>
                            <br>
                          </div>
                        </div>
                      </div>
                      <br>
                    </div>
                  </div>
                </blockquote>
              </div>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <br>
  </div></div></div>

<br></div></div><div class="im">_______________________________________________<br>
GraphHopper mailing list<br>
<a href="mailto:GraphHopper@openstreetmap.org" target="_blank">GraphHopper@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/graphhopper" target="_blank">https://lists.openstreetmap.org/listinfo/graphhopper</a><br>
<br></div></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:15px">t</span></font>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:15px">t</span></font>
</div>