[GraphHopper] Data graph

Alexander Tkachov gwalk17 at gmail.com
Sun Jun 28 12:01:09 UTC 2015


Hi!
There are some errors in the code on this page:
https://github.com/graphhopper/graphhopper/blob/master/docs/core/routing.md
With it first part, named "To do routing in your Java code you'll need just
a few lines of code"

There are:

hopper.setInMemory(true); - this method doesn't have parameters;

if(!rsp.isFound()) { - rsp has no method called isFound();

rsp.getTime(); - rsp has no method called getTime();

trMap.getWithFallBack(Locale.US); - variable trMap isn't declared.
What class it should be?

List<String> iList = il.createDescription(tr); - ilhas no method
called createDescription(tr);


I've created new maven project, create there class Main with public
static void main, for tests. Next, I added dependency

<dependency>
    <groupId>com.graphhopper</groupId>
    <artifactId>graphhopper</artifactId>
    <version>0.4.1</version>
</dependency>

to my project. Then, I paste code, and got errors, which I describe earlier.

Where is my error?


On Wed, Jun 24, 2015 at 12:08 PM, Alexander Tkachov <gwalk17 at gmail.com>
wrote:

> OK, I will analyze it. Thanks a lot one more time.
>
> On Wed, Jun 24, 2015 at 12:06 PM, Peter <graphhopper at gmx.de> wrote:
>
>>  Hi Alexander,
>>
>> GraphHopper is an open source project where everything happens on your
>> machine and a country-sized graph should fit into 1-2GB RAM. The
>> GraphHopper Directions API is a durable, hosted GraphHopper (and other
>> features) with multiple profiles for world wide coverage etc
>>
>> Regards,
>> Peter
>>
>> On 24.06.2015 12:01, Alexander Tkachov wrote:
>>
>> And what is the size of such graph?
>> I mean, if there opportunity to download some peace of the graph? It will
>> improve processing time (because the graph will be in memory) and reduce
>> your server workload.
>>
>>  Thanks a lot for the information.
>>
>> On Wed, Jun 24, 2015 at 11:44 AM, Peter <graphhopper at gmx.de> wrote:
>>
>>>  Hi Alexander,
>>>
>>> first, you should get yourself familiar on e.g. how a simple route
>>> <https://github.com/graphhopper/graphhopper/blob/master/docs/core/routing.md>
>>> can be calculated with the default algorithms from GraphHopper.
>>>
>>> Then for your new algorithm you can use the low level API
>>> <https://github.com/graphhopper/graphhopper/blob/master/docs/core/low-level-api.md>
>>> where you have direct access to the Graph object:
>>> Graph graph = graphHopper.getGraph();
>>>
>>> Read a bit about tower vs. pillar nodes, and try to traverse the graph
>>> its 'junctions' and implement the algorithm for it. As an example you can
>>> have a look into Dijkstra.java
>>> <https://github.com/graphhopper/graphhopper/blob/master/core/src/main/java/com/graphhopper/routing/Dijkstra.java>
>>> .
>>>
>>> Also read about custom weighting
>>> <https://github.com/graphhopper/graphhopper/blob/master/docs/core/weighting.md>
>>> and flag encoders
>>> <https://github.com/graphhopper/graphhopper/blob/master/docs/core/create-new-flagencoder.md>
>>> .
>>>
>>> Kind Regards,
>>> Peter
>>>
>>>
>>> On 24.06.2015 11:31, Alexander Tkachov wrote:
>>>
>>>  Hi.
>>> I have a problem. I want to implement my own search algorithm (the
>>> shortest path between two points on map for cars). For these purposes I
>>> need some kind of graph (or something else). If there opportunity to get
>>> crossroads graph? I mean, I need something, which contains crossroads where
>>> each crossroads contains coordinates, the list of nearest crossroads and
>>> distances (m or km) to these nearest crossroads. If there will be any other
>>> parameters (like speed limits etc) it will be great.
>>> How can I get such kind of data if on the beginning I have only
>>> coordinates of start and end points.
>>>
>>>  Thanks.
>>>
>>>
>>
>> _______________________________________________
>> GraphHopper mailing list
>> GraphHopper at openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/graphhopper
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20150628/95c0ce33/attachment.html>


More information about the GraphHopper mailing list