Commit ae1e68cc authored by Eric Duminil's avatar Eric Duminil
Browse files

Some more logic

parent dd1aeb90
package eu.simstadt.regionchooser; package eu.simstadt.regionchooser;
import java.io.BufferedWriter;
import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.List; import java.util.List;
import java.util.Scanner; import java.util.Scanner;
...@@ -29,24 +31,34 @@ class RegionChooserCommandLineInterface implements Callable<Integer> ...@@ -29,24 +31,34 @@ class RegionChooserCommandLineInterface implements Callable<Integer>
@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);
} }
System.out.print("And write to : "); System.out.print("And write to : ");
System.out.println(outputCityGML); System.out.println(outputCityGML);
System.out.print("in "); try (BufferedWriter bf = Files.newBufferedWriter(outputCityGML)) {
System.out.println(espgId + " coordinates."); bf.write("HELLO THERE!");
}
if (espgId == null) {
System.out.println("coordinates from " + citygmls.get(0));
} else {
System.out.print("in EPSG:");
System.out.println(espgId + " coordinates.");
}
if (System.in.available() == 0) { if (wktFile.equals("-")) {
System.out.println("OH NOEs, NO INPUT!"); if (System.in.available() == 0) {
System.out.println("OH NOEs, NO INPUT!");
} else {
System.out.println("Here's standard input:");
System.out.println(getInput());
System.out.println("Done");
}
} else { } else {
System.out.println("Here's standard input:"); System.out.println("Try to read from " + wktFile);
System.out.println(getInput());
System.out.println("Done");
} }
return 0; return 0;
} }
......
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