org.geotools.gc
Class GridRange

java.lang.Object
  extended byorg.geotools.gc.GridRange
All Implemented Interfaces:
Dimensioned, java.io.Serializable

Deprecated. Replaced by GeneralGridRange.

public class GridRange
extends java.lang.Object
implements Dimensioned, java.io.Serializable

Defines a range of grid coverage coordinates.

Version:
$Id: GridRange.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
OpenGIS, Martin Desruisseaux
See Also:
GC_GridRange, Serialized Form

Constructor Summary
GridRange(int[] lower, int[] upper)
          Deprecated. Construct a new grid range.
GridRange(int lower, int upper)
          Deprecated. Construct one-dimensional grid range.
GridRange(java.awt.image.Raster raster)
          Deprecated. Construct two-dimensional range defined by a Raster.
GridRange(java.awt.Rectangle rect)
          Deprecated. Construct two-dimensional range defined by a Rectangle.
GridRange(java.awt.image.RenderedImage image)
          Deprecated. Construct two-dimensional range defined by a RenderedImage.
 
Method Summary
 boolean equals(java.lang.Object object)
          Deprecated. Compares the specified object with this grid range for equality.
 int getDimension()
          Deprecated. Returns the number of dimensions.
 int getLength(int dimension)
          Deprecated. Returns the number of integer grid coordinates along the specified dimension.
 int getLower(int dimension)
          Deprecated. Returns the valid minimum inclusive grid coordinate along the specified dimension.
 int[] getLowers()
          Deprecated. Returns the valid minimum inclusive grid coordinates along all dimensions.
 GridRange getSubGridRange(int lower, int upper)
          Deprecated. Returns a new grid range that encompass only some dimensions of this grid range.
 int getUpper(int dimension)
          Deprecated. Returns the valid maximum exclusive grid coordinate along the specified dimension.
 int[] getUppers()
          Deprecated. Returns the valid maximum exclusive grid coordinates along all dimensions.
 int hashCode()
          Deprecated. Returns a hash value for this grid range.
 java.awt.Rectangle toRectangle()
          Deprecated. Returns a Rectangle with the same bounds as this GridRange.
 java.lang.String toString()
          Deprecated. Returns a string repr?sentation of this grid range.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GridRange

public GridRange(int lower,
                 int upper)
Deprecated. 
Construct one-dimensional grid range.

Parameters:
lower - The minimal inclusive value.
upper - The maximal exclusive value.

GridRange

public GridRange(int[] lower,
                 int[] upper)
Deprecated. 
Construct a new grid range.

Parameters:
lower - The valid minimum inclusive grid coordinate. The array contains a minimum value for each dimension of the grid coverage. The lowest valid grid coordinate is zero.
upper - The valid maximum exclusive grid coordinate. The array contains a maximum value for each dimension of the grid coverage.
See Also:
getLowers(), getUppers()

GridRange

public GridRange(java.awt.Rectangle rect)
Deprecated. 
Construct two-dimensional range defined by a Rectangle.


GridRange

public GridRange(java.awt.image.Raster raster)
Deprecated. 
Construct two-dimensional range defined by a Raster.


GridRange

public GridRange(java.awt.image.RenderedImage image)
Deprecated. 
Construct two-dimensional range defined by a RenderedImage.

Method Detail

getDimension

public int getDimension()
Deprecated. 
Returns the number of dimensions.

Specified by:
getDimension in interface Dimensioned

getLower

public int getLower(int dimension)
Deprecated. 
Returns the valid minimum inclusive grid coordinate along the specified dimension.

See Also:
GC_GridRange.getLo(), getLowers()

getUpper

public int getUpper(int dimension)
Deprecated. 
Returns the valid maximum exclusive grid coordinate along the specified dimension.

See Also:
GC_GridRange.getHi(), getUppers()

getLength

public int getLength(int dimension)
Deprecated. 
Returns the number of integer grid coordinates along the specified dimension. This is equals to getUpper(dimension)-getLower(dimension).


getLowers

public int[] getLowers()
Deprecated. 
Returns the valid minimum inclusive grid coordinates along all dimensions.


getUppers

public int[] getUppers()
Deprecated. 
Returns the valid maximum exclusive grid coordinates along all dimensions.


getSubGridRange

public GridRange getSubGridRange(int lower,
                                 int upper)
Deprecated. 
Returns a new grid range that encompass only some dimensions of this grid range. This method copy this grid range's index into a new grid range, beginning at dimension lower and extending to dimension upper-1. Thus the dimension of the subgrid range is upper-lower.

Parameters:
lower - The first dimension to copy, inclusive.
upper - The last dimension to copy, exclusive.
Returns:
The subgrid range.
Throws:
java.lang.IndexOutOfBoundsException - if an index is out of bounds.

toRectangle

public java.awt.Rectangle toRectangle()
                               throws java.lang.IllegalStateException
Deprecated. 
Returns a Rectangle with the same bounds as this GridRange. This is a convenience method for interoperability with Java2D.

Throws:
java.lang.IllegalStateException - if this grid range is not two-dimensional.

hashCode

public int hashCode()
Deprecated. 
Returns a hash value for this grid range. This value need not remain consistent between different implementations of the same class.


equals

public boolean equals(java.lang.Object object)
Deprecated. 
Compares the specified object with this grid range for equality.


toString

public java.lang.String toString()
Deprecated. 
Returns a string repr?sentation of this grid range. The returned string is implementation dependent. It is usually provided for debugging purposes.



Copyright © GeoTools. All Rights Reserved.