/**
  * Dump to the standard output stream a list of available factory implementations. This method can
  * be invoked from the command line. It provides a mean to verify if some implementations were
  * found in the classpath. The syntax is: <br>
  *
  * <BLOCKQUOTE>
  *
  * <CODE>
  * java org.geotools.referencing.FactoryFinder <VAR>&lt;options&gt;</VAR>
  * </CODE>
  *
  * </BLOCKQUOTE>
  *
  * <p>where options are:
  *
  * <TABLE CELLPADDING='0' CELLSPACING='0'>
  *   <TR><TD NOWRAP><CODE>-encoding</CODE> <VAR>&lt;code&gt;</VAR></TD>
  *       <TD NOWRAP>&nbsp;Set the character encoding</TD></TR>
  *   <TR><TD NOWRAP><CODE>-locale</CODE> <VAR>&lt;language&gt;</VAR></TD>
  *       <TD NOWRAP>&nbsp;Set the language for the output (e.g. "fr" for French)</TD></TR>
  * </TABLE>
  *
  * <p><strong>Note for Windows users:</strong> If the output contains strange symbols, try to
  * supply an "{@code -encoding}" argument. Example:
  *
  * <blockquote>
  *
  * <code>
  * java org.geotools.referencing.FactoryFinder -encoding Cp850
  * </code>
  *
  * </blockquote>
  *
  * <p>The codepage number (850 in the previous example) can be obtained from the DOS commande line
  * using the "{@code chcp}" command with no arguments.
  *
  * @param args Command line arguments.
  */
 public static void main(String[] args) {
   final Arguments arguments = new Arguments(args);
   args = arguments.getRemainingArguments(0);
   try {
     listProviders(arguments.out, arguments.locale);
   } catch (Exception exception) {
     exception.printStackTrace(arguments.err);
   }
 }
Ejemplo n.º 2
0
 /**
  * Reports the GeoTools {@linkplain #getVersion version} number to the {@linkplain System#out
  * standard output stream}.
  *
  * @param args Command line arguments.
  */
 public static void main(String[] args) {
   final Arguments arguments = new Arguments(args);
   args = arguments.getRemainingArguments(0);
   arguments.out.print("GeoTools version ");
   arguments.out.println(getVersion());
   final Hints hints = getDefaultHints();
   if (hints != null && !hints.isEmpty()) {
     arguments.out.println(hints);
   }
 }
Ejemplo n.º 3
0
 /** 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) {
     factory.reportInstantiationFailures(arguments.out);
   }
   factory.dispose();
 }