Class ProjectionCLI
java.lang.Object
org.openstreetmap.josm.data.projection.ProjectionCLI
- All Implemented Interfaces:
CLIModule
Command line interface for projecting coordinates.
- Since:
- 12792
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate booleanstatic final ProjectionCLIThe unique instance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static CustomProjectioncreateProjection(String params) Get the action keyword that the user needs to provide as first command line argument to invoke this module.private static StringgetHelp()static voidMain class to run just the projection CLI.private static doubleprivate EastNorthparseEastNorth(String s, ToDoubleFunction<String> parser) voidprocessArguments(String[] argArray) Process the remaining command line arguments and run any of the requested actions.private voidprocessInput(CustomProjection fromProj, CustomProjection toProj, BufferedReader reader) private voidprivate static voidshowHelp()Displays help on the console
-
Field Details
-
INSTANCE
The unique instance -
argInverse
-
argSwitchInput
-
argSwitchOutput
-
-
Constructor Details
-
ProjectionCLI
public ProjectionCLI()
-
-
Method Details
-
getActionKeyword
Description copied from interface:CLIModuleGet the action keyword that the user needs to provide as first command line argument to invoke this module.- Specified by:
getActionKeywordin interfaceCLIModule- Returns:
- the action keyword of this module
-
processArguments
Description copied from interface:CLIModuleProcess the remaining command line arguments and run any of the requested actions.- Specified by:
processArgumentsin interfaceCLIModule- Parameters:
argArray- command line arguments without the initial action keyword
-
showHelp
Displays help on the console -
getHelp
-
run
private void run(String fromStr, String toStr, List<String> files) throws ProjectionConfigurationException, IOException -
processInput
private void processInput(CustomProjection fromProj, CustomProjection toProj, BufferedReader reader) throws IOException - Throws:
IOException
-
createProjection
private static CustomProjection createProjection(String params) throws ProjectionConfigurationException - Throws:
ProjectionConfigurationException
-
parseEastNorth
-
parseDouble
-
main
Main class to run just the projection CLI.- Parameters:
args- command line arguments
-