Hi @andrzej, thanks for the quick reply!
I am having an issue when setting the
radiuses=-1|-1 in my query. It still comes up with a “cannot find point within radius of -1 meters.”
As an example, a point in question is … “Could not find point 0: 115.4614830 -29.6923130 within a radius of -1.0 meters.” … However, I’ll be dealing with points like this often, points quite far away from roads I mean, so it really is in my best interest to take a bit of a performance hit (locally) but always make sure my request finds a road. I can then just calculate an
error by taking the difference between the first point found in the route and the point given in the query.
Before I got stuck into any of the GraphHopper code I looked through all of the
.config files and seemed to still come up empty! The only mention of “snapping” I found in any of the configuration files was within
RouteProfileConfiguration.java. In that file I changed
int maximumSnappingRadius=350 to
int maximumSnappingRadius=15000, and even rebuilt my whole graph etc. in a fresh
docker-compose. Then when running the same API request it still by default hit the 350m limit, and then when parsing through the
-1|-1 parameter I recieved the same “Could not find point … within -1 meter radius…”.
This is what lead me to the same conclusion you guys got to within this thread: that the limit must be imposed further downstream (by GH as you revealed).
And, because my knowledge of Java is scrappy at best, I figured it’d be easiest for me to just find the
GraphHopper.java file which holds the original class, and then just switch
int maxRegionSearch=4 to
10 (or anything a bit larger). Then, after a day of searching for the class I realized that
ORSGraphHopper.java extends the original
GraphHopper.java class, which is not contained within the repo as source because it’s taken from the ‘Maven Central Repository.’ Which left me with my plan of action for today to fork the
GIScience>graphhopper repo, make the small change, and then try point maven at that instead and see if it works.
If I’m completely wasting my time, and there’s some way easier way to change these parameters (i.e. increase search radius to something like 10km) then please, please, please let me know because I’m flying blind here haha!