org.geotools.coverage.grid
Class ImageGeometry

java.lang.Object
  extended by org.geotools.coverage.grid.ImageGeometry
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org.opengis.coverage.grid.GridGeometry

public class ImageGeometry
extends java.lang.Object
implements org.opengis.coverage.grid.GridGeometry, java.io.Serializable, org.opengis.util.Cloneable

A simple grid geometry holding the grid range as a rectangle and the grid to CRS relationship as an affine transform. This grid geometry does not hold any Coordinate Reference System information. Because of that, it is not suitable to GridCoverage2D (the later rather use GridGeometry2D). But it is sometime used with plain rendered image instances.

Since:
2.5
Version:
$Id: ImageGeometry.java 33009 2009-05-14 19:40:06Z simonegiannecchini $
Author:
Martin Desruisseaux
See Also:
GridGeometry2D, GeneralGridGeometry, Serialized Form

Constructor Summary
ImageGeometry(java.awt.Rectangle bounds, java.awt.geom.AffineTransform gridToCRS)
          Creates a grid geometry from the specified bounds and grid to CRS affine transform.
 
Method Summary
 ImageGeometry clone()
          Returns a clone of this image geometry.
 boolean equals(java.lang.Object object)
          Compares this grid geometry with the specified one for equality.
 GridEnvelope2D getGridRange()
          Returns the image bounds in pixel coordinates.
 AffineTransform2D getGridToCoordinateSystem()
          Deprecated. Renamed as getGridToCRS().
 AffineTransform2D getGridToCRS()
          Returns the conversion from grid coordinates to real world earth coordinates.
 int hashCode()
          Returns a hash code value for this grid geometry.
 java.lang.String toString()
          Returns a string representation of this grid geometry.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageGeometry

public ImageGeometry(java.awt.Rectangle bounds,
                     java.awt.geom.AffineTransform gridToCRS)
Creates a grid geometry from the specified bounds and grid to CRS affine transform.

Parameters:
bounds - The image bounds in pixel coordinates.
gridToCRS - The affine transform from pixel coordinates to "real world" coordinates.
Method Detail

getGridRange

public GridEnvelope2D getGridRange()
Returns the image bounds in pixel coordinates.

Specified by:
getGridRange in interface org.opengis.coverage.grid.GridGeometry

getGridToCRS

public AffineTransform2D getGridToCRS()
Returns the conversion from grid coordinates to real world earth coordinates.

Specified by:
getGridToCRS in interface org.opengis.coverage.grid.GridGeometry

getGridToCoordinateSystem

public AffineTransform2D getGridToCoordinateSystem()
Deprecated. Renamed as getGridToCRS().


toString

public java.lang.String toString()
Returns a string representation of this grid geometry. The returned string is implementation dependent. It is usually provided for debugging purposes.

Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Returns a hash code value for this grid geometry.

Overrides:
hashCode in class java.lang.Object

equals

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

Overrides:
equals in class java.lang.Object
Parameters:
object - The object to compare with.
Returns:
true if the given object is equals to this grid geometry.

clone

public ImageGeometry clone()
Returns a clone of this image geometry.

Overrides:
clone in class java.lang.Object
Returns:
A clone of this grid geometry.


Copyright © 1996-2010 Geotools. All Rights Reserved.