Package com.massifmaps.routing
Class RouteMatchingRequest
java.lang.Object
com.massifmaps.routing.RouteMatchingRequest
A class that defines required attributes for route matching.
-
Constructor Summary
ConstructorsConstructorDescriptionRouteMatchingRequest(Projection projection, MapPosVector points, float accuracy) Constructs a new RouteMatchingRequest instance from projection, measured points and accuracy. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this object is equal to the specified object.floatReturns the accuracy of the points in the request.getCustomParameter(String param) Returns the custom parameter value of the request.getPointParameter(int index, String param) Returns the parameter value for the given routing point.Returns the measured points of the request.Returns the projection of the points in the request.inthashCode()Returns the hash value of this object.voidsetCustomParameter(String param, Variant value) Sets a custom parameter for the the request.voidsetPointParameter(int index, String param, Variant value) Sets the parameter value for the given routing point.
This is currently supported by Valhalla routing engine and can be used to specify initial or final heading, for example.toString()Creates a string representation of this request object, useful for logging.
-
Constructor Details
-
RouteMatchingRequest
Constructs a new RouteMatchingRequest instance from projection, measured points and accuracy.- Parameters:
projection- The projection of the points.points- The list of points to match. Must contains at least 1 element.accuracy- Accuracy of the points in meters.
-
-
Method Details
-
equals
Checks if this object is equal to the specified object. -
hashCode
public int hashCode()Returns the hash value of this object. -
getProjection
Returns the projection of the points in the request.- Returns:
- The projection of the request.
-
getPoints
Returns the measured points of the request.- Returns:
- The measured points of the request.
-
getAccuracy
public float getAccuracy()Returns the accuracy of the points in the request.- Returns:
- The accuracy of the points in the request.
-
getPointParameter
Returns the parameter value for the given routing point.- Parameters:
index- The routing point index.param- The name of the parameter.- Returns:
- The value of the specified parameter of the given routing point. If the parameter does not exist, empty variant is returned.
-
setPointParameter
Sets the parameter value for the given routing point.
This is currently supported by Valhalla routing engine and can be used to specify initial or final heading, for example.- Parameters:
index- The routing point index.param- The name of the parameter to set.value- The new value for the parameter of the given routing point.
-
getCustomParameter
Returns the custom parameter value of the request.- Parameters:
param- The name of the parameter to return.- Returns:
- The value of the parameter. If the parameter does not exist, empty variant is returned.
-
setCustomParameter
Sets a custom parameter for the the request.- Parameters:
param- The name of the parameter. For example, "trace_options.search_radius".value- The new value for the parameter.
-
toString
Creates a string representation of this request object, useful for logging.
-