Search in sources :

Example 1 with GISDataFormatter

use of org.opensextant.output.GISDataFormatter in project Xponents by OpenSextant.

the class TweetGeocoder method createFormatter.

/**
     * The default formatter
     */
public static GISDataFormatter createFormatter(String outputFormat, Parameters p) throws IOException, ProcessingException {
    if (p.isdefault) {
        throw new ProcessingException("Caller is required to use non-default Parameters; " + "\nat least set the output options, folder, jobname, etc.");
    }
    GISDataFormatter formatter = (GISDataFormatter) FormatterFactory.getInstance(outputFormat);
    if (formatter == null) {
        throw new ProcessingException("Wrong formatter?");
    }
    formatter.setParameters(p);
    // formatter.setOutputDir(params.outputDir);
    formatter.setOutputFilename(p.getJobName() + formatter.outputExtension);
    return formatter;
}
Also used : GISDataFormatter(org.opensextant.output.GISDataFormatter) ProcessingException(org.opensextant.processing.ProcessingException)

Aggregations

GISDataFormatter (org.opensextant.output.GISDataFormatter)1 ProcessingException (org.opensextant.processing.ProcessingException)1