Package org.geotools.coverage.grid
Class ImageGeometry
- Object
-
- ImageGeometry
-
- All Implemented Interfaces:
Serializable
,Cloneable
,GridGeometry
,Cloneable
public class ImageGeometry extends Object implements GridGeometry, Serializable, 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 toGridCoverage2D
(the later rather useGridGeometry2D
). But it is sometime used with plain rendered image instances.- Since:
- 2.5
- Author:
- Martin Desruisseaux
- See Also:
GridGeometry2D
,GeneralGridGeometry
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ImageGeometry(Rectangle bounds, AffineTransform gridToCRS)
Creates a grid geometry from the specified bounds and grid to CRS affine transform.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageGeometry
clone()
Returns a clone of this image geometry.boolean
equals(Object object)
Compares this grid geometry with the specified one for equality.GridEnvelope2D
getGridRange()
Returns the image bounds in pixel coordinates.AffineTransform2D
getGridToCRS()
Returns the conversion from grid coordinates to real world earth coordinates.int
hashCode()
Returns a hash code value for this grid geometry.String
toString()
Returns a string representation of this grid geometry.
-
-
-
Constructor Detail
-
ImageGeometry
public ImageGeometry(Rectangle bounds, 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 interfaceGridGeometry
- Returns:
- The valid coordinate range of a grid coverage.
-
getGridToCRS
public AffineTransform2D getGridToCRS()
Returns the conversion from grid coordinates to real world earth coordinates.- Specified by:
getGridToCRS
in interfaceGridGeometry
- Returns:
- The conversion from grid coordinates to real world earth coordinates.
-
toString
public String toString()
Returns a string representation of this grid geometry. The returned string is implementation dependent. It is usually provided for debugging purposes.
-
hashCode
public int hashCode()
Returns a hash code value for this grid geometry.
-
equals
public boolean equals(Object object)
Compares this grid geometry with the specified one for equality.
-
clone
public ImageGeometry clone()
Returns a clone of this image geometry.- Specified by:
clone
in interfaceCloneable
- Overrides:
clone
in classObject
- Returns:
- A clone of this grid geometry.
- See Also:
Object.clone()
-
-