Package org.geotools.resources

Examples of org.geotools.resources.Arguments


     * Implementation of the {@link #main} method, shared by subclasses.
     */
    static void main(String[] args, final Class<? extends FactoryUsingWKT> type)
            throws FactoryException
    {
        final Arguments arguments = new Arguments(args);
        Locale.setDefault(arguments.locale);
        final boolean duplicated  = arguments.getFlag("-duplicated");
        final boolean instantiate = arguments.getFlag("-test");
        args = arguments.getRemainingArguments(0);
        final FactoryUsingWKT factory = getFactory(type);
        if (duplicated) {
            factory.reportDuplicatedCodes(arguments.out);
        }
        if (instantiate) {
View Full Code Here


     *
     * The codepage number (850 in the previous example) can be fetch from the DOS
     * command line by entering the "{@code chcp}" command with no arguments.
     */
    public static void main(String[] args) {
        final Arguments arguments = new Arguments(args);
        final boolean all = arguments.getFlag("-all");
        args = arguments.getRemainingArguments(Integer.MAX_VALUE);
        final CoverageProcessor processor = getInstance();
        try {
            if (args.length == 0) {
                processor.listOperations(arguments.out);
            } else {
View Full Code Here

     * </pre>
     *
     * </blockquote>
     */
    public static void main(String[] args) {
        final Arguments arguments = new Arguments(args);
        final String operation = arguments.getOptionalString("-operation");
        args = arguments.getRemainingArguments(1);
        if (args.length != 0)
            try {
                final ImageWorker worker = new ImageWorker(new File(args[0]));
                // Force usage of tile cache for every operations, including intermediate steps.
                worker.setRenderingHint(JAI.KEY_TILE_CACHE, JAI.getDefaultInstance().getTileCache());
                if (operation != null) {
                    worker.getClass().getMethod(operation, (Class[]) null)
                            .invoke(worker, (Object[]) null);
                }
                /*
                 * TIP: Tests operations here (before the call to 'show()'), if wanted.
                 */
                worker.show();
            } catch (FileNotFoundException e) {
                arguments.printSummary(e);
            } catch (NoSuchMethodException e) {
                arguments.printSummary(e);
            } catch (Exception e) {
                e.printStackTrace(arguments.err);
            }
    }
View Full Code Here

     *
     * @param args The command-line arguments.
     * @throws IOException if an error occured while reading an image.
     */
    public static void main(String[] args) throws IOException {
        final Arguments arguments = new Arguments(args);
        final PrintWriter     out = arguments.out;
        final Locale       locale = arguments.locale;
        final String    operation = arguments.getOptionalString ("-operation");
        final Boolean  geophysics = arguments.getOptionalBoolean("-geophysics");
        final boolean     palette = arguments.getFlag           ("-palette");
        args = arguments.getRemainingArguments(1);
        if (args.length == 0) {
            out.println("Usage: Viewer [options] example");
            out.println();
            out.print("Where \"example\" is the number of the requested example (0 to ");
            out.print(GridCoverageTestBase.EXAMPLES.size() - 1);
View Full Code Here

     * </TABLE>
     *
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        final Arguments arguments = new Arguments(args);
        final String   load = arguments.getOptionalString("-load" );
        final String   file = arguments.getOptionalString("-file" );
        args = arguments.getRemainingArguments(0);
        Locale.setDefault(arguments.locale);
        final LineNumberReader input;
        final Console console;
        /*
         * The usual way to execute instructions from a file is to redirect the standard input
View Full Code Here

     * </TABLE>
     *
     * @param args The command line arguments.
     */
    public static void main(String[] args) {
        final Arguments arguments = new Arguments(args);
        final Integer indentation = arguments.getOptionalInteger(Formattable.INDENTATION);
        final String    authority = arguments.getOptionalString("-authority");
        args = arguments.getRemainingArguments(0);
        if (indentation != null) {
            Formattable.setIndentation(indentation.intValue());
        }
        final BufferedReader in = new BufferedReader(Arguments.getReader(System.in));
        try {
View Full Code Here

TOP

Related Classes of org.geotools.resources.Arguments

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.