Class MapMatchingResource

java.lang.Object
com.graphhopper.resources.MapMatchingResource

@Path("match") public class MapMatchingResource extends Object
Resource to use map matching of GraphHopper in a remote client application.
Author:
Peter Karich
  • Constructor Details

  • Method Details

    • match

      @POST @Consumes({"application/xml","application/gpx+xml"}) @Produces({"application/json","application/xml","application/gpx+xml"}) public javax.ws.rs.core.Response match(@NotNull @NotNull Gpx gpx, @Context javax.ws.rs.core.UriInfo uriInfo, @QueryParam("way_point_max_distance") @DefaultValue("0.5") double minPathPrecision, @QueryParam("type") @DefaultValue("json") String outType, @QueryParam("instructions") @DefaultValue("true") boolean instructions, @QueryParam("calc_points") @DefaultValue("true") boolean calcPoints, @QueryParam("elevation") @DefaultValue("false") boolean enableElevation, @QueryParam("points_encoded") @DefaultValue("true") boolean pointsEncoded, @QueryParam("points_encoded_multiplier") @DefaultValue("1e5") double pointsEncodedMultiplier, @QueryParam("locale") @DefaultValue("en") String localeStr, @QueryParam("profile") String profile, @QueryParam("details") List<String> pathDetails, @QueryParam("gpx.route") @DefaultValue("true") boolean withRoute, @QueryParam("gpx.track") @DefaultValue("true") boolean withTrack, @QueryParam("traversal_keys") @DefaultValue("false") boolean enableTraversalKeys, @QueryParam("gps_accuracy") @DefaultValue("10") double gpsAccuracy)
    • convertToTree

      public static com.fasterxml.jackson.databind.JsonNode convertToTree(MatchResult result, boolean elevation, boolean pointsEncoded, double pointsEncodedMultiplier)