org.deegree.coverage.tools
Class RasterCommandUtils

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

public class RasterCommandUtils
extends Object

This class contains some static convenience methods for raster commandline tools.

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

Constructor Summary
RasterCommandUtils()
           
 
Method Summary
static List<File> getAllFiles(String[] args, boolean recurse)
          Get all files from the given location(s).
static List<File> getAllFiles(String[] args, boolean recurse, String fileExt)
          Get all files from the given location(s).
static InterpolationType getInterpolationType(String type)
          Returns an InterpolationType for a string shortcut.
static byte[] parseBackgroundValue(String background)
          Parse a background value which is either a 0xdecafbad hex value or a float value.
static Envelope parseBBOX(String bbox)
          Retruns an envelope for given bbox string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RasterCommandUtils

public RasterCommandUtils()
Method Detail

getInterpolationType

public static InterpolationType getInterpolationType(String type)
                                              throws org.apache.commons.cli.ParseException
Returns an InterpolationType for a string shortcut.

Parameters:
type - bl or nn
Returns:
the interpolation type
Throws:
org.apache.commons.cli.ParseException - if the type is not supported

parseBBOX

public static Envelope parseBBOX(String bbox)
                          throws org.apache.commons.cli.ParseException
Retruns an envelope for given bbox string.

Parameters:
bbox - comma separated bbox
Returns:
the parsed envelope
Throws:
org.apache.commons.cli.ParseException - if the bbox is invalid

parseBackgroundValue

public static byte[] parseBackgroundValue(String background)
                                   throws org.apache.commons.cli.ParseException
Parse a background value which is either a 0xdecafbad hex value or a float value. Float values will be returned as a 4-byte array.

Parameters:
background -
Returns:
a byte array with the parsed value
Throws:
org.apache.commons.cli.ParseException

getAllFiles

public static List<File> getAllFiles(String[] args,
                                     boolean recurse,
                                     String fileExt)
Get all files from the given location(s).

Parameters:
args - array with file and directory names.
recurse - recurse into all directories
fileExt - only get files with the given file suffix
Returns:
a list with all given files and all files in the given directories.

getAllFiles

public static List<File> getAllFiles(String[] args,
                                     boolean recurse)
Get all files from the given location(s).

Parameters:
args - array with file and directory names.
recurse - recurse into all directories
Returns:
a list with all given files and all files in the given directories.


Copyright © 2011. All Rights Reserved.