Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
4cbddaab
Commit
4cbddaab
authored
Oct 07, 2022
by
Eric Duminil
Browse files
Bit more
parent
b5d693f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/eu/simstadt/regionchooser/RegionChooserCommandLineInterface.java
View file @
4cbddaab
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment