org.deegree.tools.coverage.rtb
Class RasterTreeBuilder

java.lang.Object
  extended by org.deegree.tools.coverage.rtb.RasterTreeBuilder

public class RasterTreeBuilder
extends Object

This class builds a raster tree for input files.

Version:
$Revision: 29704 $, $Date: 2011-02-15 14:49:44 +0100 (Tue, 15 Feb 2011) $
Author:
Oliver Tonnhofer, last edited by: $Author: aschmitz $

Constructor Summary
RasterTreeBuilder(RasterIOOptions options, ICRS dstSRS, File dstDir, int maxTileSize, InterpolationType interpolation)
          Creates a new RasterTreeBuilder.
 
Method Summary
 void buildRasterTree(AbstractRaster srcRaster, int numOfLevels)
          Builds a raster tree for the input files-
 InterpolationType getInterpolation()
           
 RasterIOOptions getIOOptions()
           
 int getTileSize()
           
 void setBackgroundValue(byte[] backgroundValue)
          Sets the background value.
 void setBaseEnvelope(Envelope env)
          Set the envelope of the first level.
 void setBaseResolution(float baseResolution)
          Set the target resolution of the the first level.
 void setForceTileSize(boolean force)
          Set if the maxTileSize should be forced to be the actual size.
 void setNumThreads(int num)
           
 void setOutputFormat(String outputFormat)
          Sets the format for the output raster files.
 void setOverwriteExistingFiles(boolean overwrite)
          Set if existing tiles should be replaced (default is true).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RasterTreeBuilder

public RasterTreeBuilder(RasterIOOptions options,
                         ICRS dstSRS,
                         File dstDir,
                         int maxTileSize,
                         InterpolationType interpolation)
Creates a new RasterTreeBuilder. See the additional set*()-methods for further options.

Parameters:
options - needed for reading the raster files
dstSRS - the target crs
dstDir - the output directory of the raster tree
maxTileSize - the max tile size
interpolation - the raster interpolation
Method Detail

setOverwriteExistingFiles

public void setOverwriteExistingFiles(boolean overwrite)
Set if existing tiles should be replaced (default is true).

Parameters:
overwrite -

setBaseEnvelope

public void setBaseEnvelope(Envelope env)
Set the envelope of the first level.

Parameters:
env -

setBaseResolution

public void setBaseResolution(float baseResolution)
Set the target resolution of the the first level.

Parameters:
baseResolution - resolution in units/px

setForceTileSize

public void setForceTileSize(boolean force)
Set if the maxTileSize should be forced to be the actual size.

Parameters:
force -

setBackgroundValue

public void setBackgroundValue(byte[] backgroundValue)
Sets the background value.

Parameters:
backgroundValue -

setOutputFormat

public void setOutputFormat(String outputFormat)
Sets the format for the output raster files.

Parameters:
outputFormat -

setNumThreads

public void setNumThreads(int num)
Parameters:
num - the number of threads to use in parallel for loading and processing

buildRasterTree

public void buildRasterTree(AbstractRaster srcRaster,
                            int numOfLevels)
                     throws TransformationException,
                            IllegalArgumentException,
                            UnknownCRSException,
                            IOException
Builds a raster tree for the input files-

Parameters:
srcRaster - array with filenames
numOfLevels - number of raster levels, use -1 for automatic calculation of the number
Throws:
TransformationException
UnknownCRSException
IllegalArgumentException
IOException

getTileSize

public int getTileSize()
Returns:
the tileSize

getInterpolation

public InterpolationType getInterpolation()
Returns:
the interpolation

getIOOptions

public RasterIOOptions getIOOptions()
Returns:
the raster io options


Copyright © 2011. All Rights Reserved.