5

I have installed Graphhopper in Ubuntu Server using the $ git clone command and using the asian map available here.

I started my server using the following command:

$ ./graphhopper.sh web asia_india.pbf

I then get an error while sending the following request:

http://serveraddresss:8989/route?calc_points=false&point=9.983242,76.390418&point=9.990618,76.421088

The answer I receive from the server is:

{"info":{"errors":[{"message":"Cannot find point 1: 9.9906,76.421","details":"java.lang.IllegalArgumentException"}]}}

Apparently, in the function getPaths() of core/src/main/java/com/graphhopper/GraphHopper.java, the function locationIndex.findClosest(point.lat, point.lon, edgeFilter); is not getting any nearby roads.

But if I try the same point in the Graphhopper website, it gets its nearest point and the distance to it. (you can see this here).

I want to know why my Graphhopper server setup gives different results than graphhopper.com.

  1. Any configuration needs to be changed to get the live graphhopper setup ?

  2. Also can someone tell me how to rebuild the jar file alone while starting $ ./graphhopper.sh web asia_india.pbf so that I can put some prints and try to debug or improve the system ?

  3. How does the function locationIndex.findClosest(point.lat, point.lon, edgeFilter); work? I am actually not coming from a java background.

JonasVautherin
  • 7,297
  • 6
  • 49
  • 95
DJM
  • 594
  • 1
  • 5
  • 18

1 Answers1

7

You can play with a larger lookup radius:

index.highResolution=1000

(we are working on a more dynamic solution)

But as you can see there are really no roads around your point, so it also could make sense that the route is not found. Depending on your use case.

2) Also can someone tell me how to rebuild the jar file

do you mean ./graphhopper.sh clean?

How the function locationIndex.findClosest(point.lat, point.lon, edgeFilter);

It is a kind of a quadtree, we build this in-memory and flush it to disc in a special compressed format.

Karussell
  • 17,085
  • 16
  • 97
  • 197