deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.coverage.raster.utils
Class Rasters

java.lang.Object
  extended by org.deegree.coverage.raster.utils.Rasters

public class Rasters
extends Object

Rasters supplies handy methods for rasters.

Version:
$Revision: 21786 $, $Date: 2010-01-06 17:25:14 +0100 (Mi, 06 Jan 2010) $
Author:
Rutger Bezema, last edited by: $Author: rbezema $

Constructor Summary
Rasters()
           
 
Method Summary
static int calcApproxTiles(int rasterWidth, int rasterHeight, int preferredTileSize)
          Calculates the number of tiles fitting the given preferred size and the largest of the given raster sides.
static int calcTileSize(float rasterSide, int numberOfTiles)
          Calculates the size of a single tile side.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rasters

public Rasters()
Method Detail

calcTileSize

public static final int calcTileSize(float rasterSide,
                                     int numberOfTiles)
Calculates the size of a single tile side.

Parameters:
rasterSide - either the width or the height of the entire raster.
numberOfTiles - of the entire raster.
Returns:
the size (in pixels) of a single tile side.

calcApproxTiles

public static final int calcApproxTiles(int rasterWidth,
                                        int rasterHeight,
                                        int preferredTileSize)
Calculates the number of tiles fitting the given preferred size and the largest of the given raster sides. Determination is based on 1.5 times the given tile size, so if the largest entire raster side (for example the width) is 1600 and the preferred tile size is 1000 this method will return 2, if however the largest side would have been 1400, this method would return 1.

Parameters:
rasterWidth - of the entire raster
rasterHeight - of the entire raster
preferredTileSize - in pixels of the largest side.
Returns:
the number of tiles which will fit the preferred size. Determination is based on the largest given side.

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>