diff --git a/src/main/java/eu/simstadt/regionchooser/RegionChooserCommandLineInterface.java b/src/main/java/eu/simstadt/regionchooser/RegionChooserCommandLineInterface.java index 2bf2a185b5cf44ef109dfd8fc2f9930f90173681..1a3be141e1aa95a4de85e590d6b1c741c7499346 100644 --- a/src/main/java/eu/simstadt/regionchooser/RegionChooserCommandLineInterface.java +++ b/src/main/java/eu/simstadt/regionchooser/RegionChooserCommandLineInterface.java @@ -7,22 +7,24 @@ import picocli.CommandLine; import picocli.CommandLine.Command; import picocli.CommandLine.Option; -import picocli.CommandLine.Parameters; -@Command(name = "region_chooser", mixinStandardHelpOptions = true, version = "regionChooser x.x", description = "Extracts a region from one or more citygmls.") +@Command(name = "region_chooser", mixinStandardHelpOptions = true, version = "regionChooser x.x", description = "Extracts a region from one or more citygmls.", sortOptions = false) class RegionChooserCommandLineInterface implements Callable<Integer> { - @Parameters(index = "0", description = "SRS Name : 'EPSG:31467' or just 31467") - String srsName; + @Option(names = { "-i", + "--input" }, required = true, split = ",", description = "Citygml files to extract from", paramLabel = "input.gml") + List<Path> citygmls; - @Parameters(index = "1", description = "Output file : output.gml", paramLabel = "<output_citygml>") + @Option(names = { "-o", + "--output" }, required = true, description = "Output file", paramLabel = "output.gml") Path outputCityGML; - @Parameters(index = "2..*", arity = "1..*", description = "The citygml files to extract from : input1.gml input2.gml") - List<Path> citygmls; + @Option(names = { "-e", "--epsg" }, description = "EPSG id for coordinate reference system", paramLabel = "31467") + Integer espgId; - @Option(names = "--wkt", description = "File containing WKT polygon, or - for stdin", paramLabel = "file") + @Option(names = { "-w", + "--wkt" }, description = "File containing WKT polygon, or - for stdin", paramLabel = "polygon.wkt") String wktFile = "-"; @Override @@ -36,7 +38,7 @@ public Integer call() throws Exception { // your business logic goes here... System.out.print("And write to : "); System.out.println(outputCityGML); System.out.print("in "); - System.out.println(srsName + " coordinates."); + System.out.println(espgId + " coordinates."); if (System.in.available() == 0) { System.out.println("OH NOEs, NO INPUT!");