Package com.graphhopper
Class GHRequest
java.lang.Object
com.graphhopper.GHRequest
Request object to perform routing with GraphHopper.
- Author:
- Peter Karich, ratrun
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd stopover point to routing request.getHints()
boolean
static boolean
isAzimuthValue
(double heading) This method sets a key value pair in the hints and is unrelated to the setPointHints method.setAlgorithm
(String algo) For possible values see AlgorithmOptions.*setCurbsides
(List<String> curbsides) setCustomModel
(CustomModel customModel) setHeadings
(List<Double> headings) Sets the headings, i.e.setPathDetails
(List<String> pathDetails) setPointHints
(List<String> pointHints) setProfile
(String profile) setSnapPreventions
(List<String> snapPreventions) toString()
-
Constructor Details
-
GHRequest
public GHRequest() -
GHRequest
public GHRequest(int size) -
GHRequest
public GHRequest(double fromLat, double fromLon, double toLat, double toLon) Creates a routing request from one point (fromLat, fromLon) to another (toLat, toLon) -
GHRequest
-
GHRequest
- Parameters:
points
- List of stopover points in order: start, 1st stop, 2nd stop, ..., end
-
-
Method Details
-
setPoints
-
getPoints
-
addPoint
Add stopover point to routing request.- Parameters:
point
- geographical position (see GHPoint)
-
setHeadings
Sets the headings, i.e. the direction the route should leave the starting point and the directions the route should arrive from at the via-points and the end point. Each heading is given as north based azimuth (clockwise) in [0, 360) or NaN if no direction shall be specified.The number of headings must be zero (default), one (for the start point) or equal to the number of points when sending the request.
-
getHeadings
-
isAzimuthValue
public static boolean isAzimuthValue(double heading) -
getAlgorithm
-
setAlgorithm
For possible values see AlgorithmOptions.* -
getLocale
-
setLocale
-
setLocale
-
getCustomModel
-
setCustomModel
-
getProfile
-
setProfile
-
getHints
-
putHint
This method sets a key value pair in the hints and is unrelated to the setPointHints method. It is mainly used for deserialization with Jackson.- See Also:
-
setPointHints
-
getPointHints
-
setCurbsides
-
getCurbsides
-
hasSnapPreventions
public boolean hasSnapPreventions() -
setSnapPreventions
-
getSnapPreventions
-
setPathDetails
-
getPathDetails
-
toString
-