diff --git a/matching-web/src/main/java/com/graphhopper/matching/cli/ImportCommand.java b/matching-web/src/main/java/com/graphhopper/matching/cli/ImportCommand.java index 00c7c42..7f26e6d 100644 --- a/matching-web/src/main/java/com/graphhopper/matching/cli/ImportCommand.java +++ b/matching-web/src/main/java/com/graphhopper/matching/cli/ImportCommand.java @@ -27,6 +27,10 @@ public void configure(Subparser subparser) { .type(String.class) .required(false) .setDefault("car"); + subparser.addArgument("--graph_elevation_provider") + .type(String.class) + .required(false) + .setDefault(""); } @Override @@ -36,6 +40,7 @@ public void run(Bootstrap bootstrap, Namespace args) { graphHopperConfiguration.putObject("graph.flag_encoders", vehicle); graphHopperConfiguration.putObject("datareader.file", args.getString("datasource")); graphHopperConfiguration.putObject("graph.location", "graph-cache"); + graphHopperConfiguration.putObject("graph.elevation.provider", args.getString("graph_elevation_provider")); // always using fastest weighting, see comment in MatchCommand String weightingStr = "fastest"; List profiles = new ArrayList<>(); diff --git a/matching-web/src/main/java/com/graphhopper/matching/cli/MatchCommand.java b/matching-web/src/main/java/com/graphhopper/matching/cli/MatchCommand.java index 4b68cc5..5928d11 100644 --- a/matching-web/src/main/java/com/graphhopper/matching/cli/MatchCommand.java +++ b/matching-web/src/main/java/com/graphhopper/matching/cli/MatchCommand.java @@ -64,12 +64,17 @@ public void configure(Subparser subparser) { .type(String.class) .required(false) .setDefault(""); + subparser.addArgument("--graph_elevation_provider") + .type(String.class) + .required(false) + .setDefault(""); } @Override public void run(Bootstrap bootstrap, Namespace args) { GraphHopperConfig graphHopperConfiguration = new GraphHopperConfig(); String ghFolder = "graph-cache"; + graphHopperConfiguration.putObject("graph.elevation.provider", args.getString("graph_elevation_provider")); graphHopperConfiguration.putObject("graph.location", ghFolder); String vehicle = args.getString("vehicle");