org.deegree.coverage.tools
Class RasterOptionsParser

java.lang.Object
  extended by org.deegree.coverage.tools.RasterOptionsParser

public class RasterOptionsParser
extends Object

The RasterOptionsParser supplies methods for creating a raster from the command line.

Version:
$Revision: 31644 $, $Date: 2011-08-24 22:27:43 +0200 (Wed, 24 Aug 2011) $
Author:
Rutger Bezema, last edited by: $Author: mschneider $

Field Summary
static String OPT_OUTPUT_TYPE
          Output type to unify raster command line tools: output_type
static String OPT_OUTPUT_TYPE_ABBREV
          Output type abbreviation to unify raster command line tools: ot
static String OPT_RASTER_LOCATION
          The 'input' raster location
static String OPT_RASTER_OUT_LOC
          Output directory to unify raster command line tools: output_location
static String OPT_RASTER_OUT_LOC_ABBREV
          Output directory abbreviation to unify raster command line tools: rod
static String OPT_RECURSIVE
          Should the raster directory be read recursively
static String OPT_TYPE_DESC
          Description of a raster type to unify raster command line tools: tiff|jpg|png|...
 
Constructor Summary
RasterOptionsParser()
           
 
Method Summary
static void addRasterIOLineOptions(org.apache.commons.cli.Options options)
          Add the rasterio (loading) options to the given cli options.
static File getRasterLocation(org.apache.commons.cli.CommandLine line)
          Return the rasters location.
static AbstractCoverage loadCoverage(org.apache.commons.cli.CommandLine line, RasterIOOptions options)
           
static RasterIOOptions parseRasterIOOptions(org.apache.commons.cli.CommandLine line)
          Read options from the command line and create a RasterIOOptions from them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPT_RASTER_LOCATION

public static final String OPT_RASTER_LOCATION
The 'input' raster location

See Also:
Constant Field Values

OPT_RECURSIVE

public static final String OPT_RECURSIVE
Should the raster directory be read recursively

See Also:
Constant Field Values

OPT_RASTER_OUT_LOC

public static final String OPT_RASTER_OUT_LOC
Output directory to unify raster command line tools: output_location

See Also:
Constant Field Values

OPT_RASTER_OUT_LOC_ABBREV

public static final String OPT_RASTER_OUT_LOC_ABBREV
Output directory abbreviation to unify raster command line tools: rod

See Also:
Constant Field Values

OPT_OUTPUT_TYPE

public static final String OPT_OUTPUT_TYPE
Output type to unify raster command line tools: output_type

See Also:
Constant Field Values

OPT_OUTPUT_TYPE_ABBREV

public static final String OPT_OUTPUT_TYPE_ABBREV
Output type abbreviation to unify raster command line tools: ot

See Also:
Constant Field Values

OPT_TYPE_DESC

public static final String OPT_TYPE_DESC
Description of a raster type to unify raster command line tools: tiff|jpg|png|...

See Also:
Constant Field Values
Constructor Detail

RasterOptionsParser

public RasterOptionsParser()
Method Detail

parseRasterIOOptions

public static RasterIOOptions parseRasterIOOptions(org.apache.commons.cli.CommandLine line)
                                            throws org.apache.commons.cli.ParseException
Read options from the command line and create a RasterIOOptions from them.

Parameters:
line -
Returns:
the raster io options parsed from the command line.
Throws:
org.apache.commons.cli.ParseException

addRasterIOLineOptions

public static void addRasterIOLineOptions(org.apache.commons.cli.Options options)
Add the rasterio (loading) options to the given cli options.

Parameters:
options -

loadCoverage

public static AbstractCoverage loadCoverage(org.apache.commons.cli.CommandLine line,
                                            RasterIOOptions options)
                                     throws IOException
Parameters:
line - to get the raster directory and the recursive option from.
options - created from parseRasterIOOptions(CommandLine)
Returns:
the loaded abstract coverage.
Throws:
IOException

getRasterLocation

public static File getRasterLocation(org.apache.commons.cli.CommandLine line)
                              throws IOException
Return the rasters location.

Parameters:
line - to get the location from.
Returns:
a File denoting a raster location, which may be a directory or a single file.
Throws:
IOException - if the location does not exist.


Copyright © 2011. All Rights Reserved.