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

Bit more

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