<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">Hi Andreas,<br>
<br>
ah, ok. That is a (current) limitation of the location index that
no recursive search is triggered if nothing is found.<br>
<br>
Regards,<br>
Peter.<br>
<br>
</div>
<blockquote
cite="mid:CAL83n0-JDVcXSKyDUOB3gxbPRPGM3K4ehcnYc=0LJX2_8vE3sA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>OH! I am sorry.<br>
</div>
I didn't set the resolution correctly! The grid cells have
been too small.<br>
<br>
</div>
Thank you.<br>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">2014-02-17 7:24 GMT+01:00 Andreas
Fischer <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:fischer.andreas.atf@googlemail.com"
target="_blank">fischer.andreas.atf@googlemail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>Hmm... not quite. Result of findNetworkEntries()
still returns 0 entries.<br>
<br>
</div>
Do you get a result when loading the test-osm3.xml and
call findNetworkEntries()?<br>
</div>
<div class="gmail_extra">
<br>
<br>
<div class="gmail_quote">2014-02-14 23:49 GMT+01:00 Peter
K <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:peathal@yahoo.de" target="_blank">peathal@yahoo.de</a>></span>:
<div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Try setInMemory(true, true) instead of
setInMemory(true, false)<br>
<br>
Regards,<br>
Peter.<br>
<br>
BTW: This was recently changed and now just reads
setInMemory(true)<br>
<div>
<div><br>
> Hi There,<br>
><br>
> I want to test an algorithm which i wrote
on a very simple graph (like<br>
> the test.osm in the storage test cases).<br>
> My algorithm uses location indexes. My
algo first gets all nodes<br>
> nearby by calling findNetworkEntries(lat,
lon).<br>
> This usually works on my external built
graph (e.g. on my smart phone)<br>
> but it does not work if i just load an
OSM file with GraphHopper via<br>
> setInMemory(true, false)<br>
><br>
> My code is equivalent to the GraphHopper
test case:<br>
><br>
> private static final String testOsm3 =<br>
>
"./src/test/resources/com/graphhopper/reader/test-osm3.xml";<br>
> private static final String ghLoc =
"./target/tmp/ghosm";<br>
> private GraphHopper gh;<br>
><br>
> @Before<br>
> public void setUp(){<br>
> Helper.removeDir(new File(ghLoc));<br>
> }<br>
><br>
> @After<br>
> public void tearDown(){<br>
> gh.close();<br>
> Helper.removeDir(new File(ghLoc));<br>
> }<br>
><br>
> @Test<br>
> public void myAlgoTest(){<br>
> gh = new
GraphHopper().setInMemory(true,<br>
> false).setEncodingManager(new
EncodingManager("CAR"))<br>
><br>
>
.setGraphHopperLocation(ghLoc).setOSMFile(testOsm3);<br>
> gh.importOrLoad();<br>
><br>
> myAlgoDoesFancyStuff();<br>
> }<br>
><br>
> The problem is, that it seems that it
didn't create any location<br>
> indexes and findNetworkEntries() returns
0 entries.<br>
> What is the easiest way to create the
location indexes that i get<br>
> findNetworkEntries() working?<br>
<br>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
</body>
</html>