org.deegree.coverage.raster.utils
Class RasterBuilder

java.lang.Object
  extended by org.deegree.coverage.raster.utils.RasterBuilder
All Implemented Interfaces:
CoverageBuilder

public class RasterBuilder
extends java.lang.Object
implements CoverageBuilder

The RasterBuilder recursively enters a given directory and creates a TiledRaster from found image files.

Version:
$Revision: 28084 $, $Date: 2010-11-12 14:13:32 +0100 (Fr, 12. Nov 2010) $
Author:
Rutger Bezema, last edited by: $Author: mschneider $

Nested Class Summary
static class RasterBuilder.QTreeInfo
           
 
Constructor Summary
RasterBuilder()
           
 
Method Summary
 AbstractCoverage buildCoverage(java.io.File rasterLocation, boolean recursive, RasterIOOptions options)
          Creates a coverage from the given raster location.
 AbstractCoverage buildCoverage(java.net.URL configURL)
          Creates a new AbstractCoverage instance from the given configuration document.
 MultiResolutionRaster buildMultiResolutionRaster(java.io.File resolutionDirectory, boolean recursive, RasterIOOptions options)
          Create a MultiResolutionRaster with the origin or the world coordinate of each raster file, defined by the given RasterGeoReference.OriginLocation
 java.lang.String getConfigNamespace()
          Returns the namespace for configurations documents that this provider handles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RasterBuilder

public RasterBuilder()
Method Detail

buildMultiResolutionRaster

public MultiResolutionRaster buildMultiResolutionRaster(java.io.File resolutionDirectory,
                                                        boolean recursive,
                                                        RasterIOOptions options)
Create a MultiResolutionRaster with the origin or the world coordinate of each raster file, defined by the given RasterGeoReference.OriginLocation

Parameters:
resolutionDirectory - locating the different resolutions
recursive - if the sub directories of the resolution directories should be scanned as well
options - containing information on the loading of the raster data.
Returns:
a MultiResolutionRaster filled with TiledRasters or null if the resolutionDirectory is not a directory.

getConfigNamespace

public java.lang.String getConfigNamespace()
Description copied from interface: CoverageBuilder
Returns the namespace for configurations documents that this provider handles.

Specified by:
getConfigNamespace in interface CoverageBuilder
Returns:
the namespace for configurations documents, never null

buildCoverage

public AbstractCoverage buildCoverage(java.net.URL configURL)
                               throws java.io.IOException
Description copied from interface: CoverageBuilder
Creates a new AbstractCoverage instance from the given configuration document.

Specified by:
buildCoverage in interface CoverageBuilder
Parameters:
configURL - location of the configuration document, must not be null
Returns:
new AbstractCoverage instance, configured
Throws:
java.io.IOException - if the configuration contains an error or creation fails

buildCoverage

public AbstractCoverage buildCoverage(java.io.File rasterLocation,
                                      boolean recursive,
                                      RasterIOOptions options)
                               throws java.io.IOException
Creates a coverage from the given raster location. Supported are loading from:

Parameters:
rasterLocation - may be a raster file or a raster directory containing a tiled raster or several sub directories named with doubles, containing different resolutions (a multiresolution raster tree).
recursive - if the directory should be searched recursively.
options - containing configured values for the loading of the coverage.
Returns:
an AbstractCoverage created from the given raster location. Result can be a SimpleRaster a TiledRaster or a MultiResolutionRaster.
Throws:
java.io.IOException - if the raster location could not be read.


Copyright © 2011. All Rights Reserved.