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;
}
Aggregations