public class ProjectionCLI extends java.lang.Object implements CLIModule
| Modifier and Type | Field and Description |
|---|---|
private boolean |
argInverse |
private boolean |
argSwitchInput |
private boolean |
argSwitchOutput |
static ProjectionCLI |
INSTANCE
The unique instance
|
| Constructor and Description |
|---|
ProjectionCLI() |
| Modifier and Type | Method and Description |
|---|---|
private static CustomProjection |
createProjection(java.lang.String params) |
java.lang.String |
getActionKeyword()
Get the action keyword that the user needs to provide as first command
line argument to invoke this module.
|
private static java.lang.String |
getHelp() |
static void |
main(java.lang.String[] args)
Main class to run just the projection CLI.
|
private static double |
parseDouble(java.lang.String s) |
private EastNorth |
parseEastNorth(java.lang.String s,
java.util.function.ToDoubleFunction<java.lang.String> parser) |
void |
processArguments(java.lang.String[] argArray)
Process the remaining command line arguments and run any of the requested actions.
|
private void |
processInput(CustomProjection fromProj,
CustomProjection toProj,
java.io.BufferedReader reader) |
private void |
run(java.lang.String fromStr,
java.lang.String toStr,
java.util.List<java.lang.String> files) |
private static void |
showHelp()
Displays help on the console
|
public static final ProjectionCLI INSTANCE
private boolean argInverse
private boolean argSwitchInput
private boolean argSwitchOutput
public ProjectionCLI()
public java.lang.String getActionKeyword()
CLIModulegetActionKeyword in interface CLIModulepublic void processArguments(java.lang.String[] argArray)
CLIModuleprocessArguments in interface CLIModuleargArray - command line arguments without the initial action keywordprivate static void showHelp()
private static java.lang.String getHelp()
private void run(java.lang.String fromStr, java.lang.String toStr, java.util.List<java.lang.String> files) throws ProjectionConfigurationException, java.io.IOException
ProjectionConfigurationExceptionjava.io.IOExceptionprivate void processInput(CustomProjection fromProj, CustomProjection toProj, java.io.BufferedReader reader) throws java.io.IOException
java.io.IOExceptionprivate static CustomProjection createProjection(java.lang.String params) throws ProjectionConfigurationException
ProjectionConfigurationExceptionprivate EastNorth parseEastNorth(java.lang.String s, java.util.function.ToDoubleFunction<java.lang.String> parser)
private static double parseDouble(java.lang.String s)
public static void main(java.lang.String[] args)
args - command line arguments