<div dir="ltr"><div dir="ltr"><div>I've managed to create a bbox but there's one big problem that I just don't get. </div><div><br></div><div>Screenshot1: <a href="https://www.dropbox.com/s/7f7mb88rl5qdlqa/Screenshot1.png">https://www.dropbox.com/s/7f7mb88rl5qdlqa/Screenshot1.png</a></div>
<div>Screenshot2: <a href="https://www.dropbox.com/s/kherjlhbyg3chgt/Screenshot2.png">https://www.dropbox.com/s/kherjlhbyg3chgt/Screenshot2.png</a></div><div>Screenshot3: <a href="https://www.dropbox.com/s/bqrwimadgyq8w5w/Screenshot3.png">https://www.dropbox.com/s/bqrwimadgyq8w5w/Screenshot3.png</a></div>
<div>Screenshot4: <a href="https://www.dropbox.com/s/poeq7uixw1m956l/Screenshot4.png">https://www.dropbox.com/s/poeq7uixw1m956l/Screenshot4.png</a></div><div><br></div><div>Screenshot1: </div><div>Red flags on intersections represent points that I've used for my BBox. </div>
<div>Green flag is point from and another red flag is point to (marked).</div><div><br></div><div>I'm running Dijkstra. In Screenshot1 you can see that it finds the shortest path. (as you would expect since it's in a bbox)</div>
<div>Though in second screenshot you can see that it doesn't though it should still fit inside the bbox if I understand correctly..</div><div><br></div><div>So, sometimes it finds it, sometimes it doesn't. </div><div>
<br></div><div>It gets even weirder when you zoom in. I've zoomed on approximate "to" illustrated in Screenshot2.</div><div>As you can see, Screenshot3 - path founded. Go few meters other direction - no path (Screenshot4)</div>
<div><br></div><div>My bbox implementation as it is: </div><div><br></div><div><div>EdgeFilter edgFilt = new EdgeFilter()</div><div>                {</div><div>                    @Override</div><div>                    public boolean accept( EdgeIteratorState edgeIterState )</div>
<div>                    {</div><div>                   </div><div>                        baseLat = graph.getLatitude(fromRes.getClosestNode()); //point "from"</div><div>                        baseLon = graph.getLongitude(fromRes.getClosestNode());</div>
<div>                        adjLat = graph.getLatitude(toRes.getClosestNode()); //point "to"</div><div>                        adjLon = graph.getLongitude(toRes.getClosestNode());                       </div><div>
                        BBox bbox = new BBox(25.176716, 25.270786, 54.688702, 54.747895);     //Screenshot1 - BBox top & BBox bottom                                                   </div><div>                        return bbox.contains(baseLat, baseLon) || bbox.contains(adjLat, adjLon);                                                </div>
<div>                    }</div><div>                };  </div></div><div><br></div><div>Dijkstra dijkstra = null;</div><div><div>AlgorithmPreparation prepd = prepareGraph(graph, encoder, weighting); //graph encoder, weighting - everything as in Graphhopper.java</div>
<div>dijkstra = (Dijkstra) prepd.createAlgo(); </div><div>dijkstra.setEdgeFilter(edgFilt); </div></div><div><br></div><div>Any help would be really appreciated. </div><div><br></div><div>Best regards</div><div><br></div></div>
</div>