Commit 4cbddaab authored by Eric Duminil's avatar Eric Duminil
Browse files

Bit more

parent b5d693f8
......@@ -6,6 +6,7 @@
import java.util.concurrent.Callable;
import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;
import picocli.CommandLine.Parameters;
......@@ -15,14 +16,19 @@ class RegionChooserCommandLineInterface implements Callable<Integer>
@Parameters(index = "0", description = "SRS Name : 'EPSG:31467' or just 31467")
String srsName;
@Parameters(index = "1", description = "Output file : output.gml")
@Parameters(index = "1", description = "Output file : output.gml", paramLabel = "<output_citygml>")
Path outputCityGML;
@Parameters(index = "2..*", arity = "1..*", description = "The citygml files to extract from : input1.gml input2.gml")
List<Path> citygmls;
@Option(names = "--wkt", description = "File containing WKT polygon, or - for stdin", paramLabel = "file")
String wktFile = "-";
@Override
public Integer call() throws Exception { // your business logic goes here...
System.out.println("WKT from : ");
System.out.println(wktFile);
System.out.println("Should extract from :");
for (Path input_citygml : citygmls) {
System.out.println(" " + input_citygml);
......@@ -43,8 +49,9 @@ public Integer call() throws Exception { // your business logic goes here...
}
private static String getInput() {
Scanner myObj = new Scanner(System.in);
return myObj.nextLine();
try (Scanner myObj = new Scanner(System.in)) {
return myObj.nextLine();
}
}
// this example implements Callable, so parsing, error handling and handling user
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment