|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectImageGeometry
@Immutable public class ImageGeometry
A simple grid geometry holding the grid envelope as a rectangle and the grid to CRS relationship as an affine transform.
This class does not specify whatever the grid to CRS transform maps pixel
center or upper left corner. The OGC convention is to map pixel center, while the Java2D convention
is to map pixel corner. It is user responsibility to know the convention in use. For a more
powerful class providing support for arbitrary convention, see GridGeometry2D.
This grid geometry does not hold any
Coordinate Reference System
information. Consequently it is not suitable for usage with GridCoverage2D. This
ImageGeometry class is rather designed as a lightweight container for usage with
RenderedImage instances.
GridGeometry2D,
GeneralGridGeometry,
Serialized Form
| coverage/geotk-coverage (download) | View source code for this class |
| Constructor Summary | |
|---|---|
ImageGeometry(Rectangle bounds,
AffineTransform gridToCRS)
Creates a grid geometry from the specified bounds and grid to CRS affine transform. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object object)
Compares this grid geometry with the specified one for equality. |
Rectangle2D |
getEnvelope(PixelOrientation orientation)
Returns the georeferenced image envelope in "real world" coordinates. |
GridEnvelope2D |
getExtent()
Returns the image bounds in pixel coordinates. |
GridEnvelope2D |
getGridRange()
Deprecated. Renamed getExtent(). |
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. |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ImageGeometry(Rectangle bounds,
AffineTransform gridToCRS)
bounds - The image bounds in pixel coordinates.gridToCRS - The affine transform from pixel coordinates to "real world" coordinates.| Method Detail |
|---|
public GridEnvelope2D getExtent()
getExtent in interface GridGeometry@Deprecated public GridEnvelope2D getGridRange()
getExtent().
getGridRange in interface GridGeometrypublic AffineTransform2D getGridToCRS()
getGridToCRS in interface GridGeometrypublic Rectangle2D getEnvelope(PixelOrientation orientation)
grid to CRS transform. The transform may maps pixel center or a corner, depending
on the value of the orientation argument.
According OGC specification, the transform shall maps pixel center. However Java2D usage
is to maps the upper-left corner. Because this ImageGeometry class is primarily
designed for use with rendered images, this method allows to
override the OGC behavior with the Java2D one if needed.
orientation - Whatever the transform maps pixel center or a corner. If this argument
is not provided, the default value is CENTER.
public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object object)
equals in class Objectobject - The object to compare with.
true if the given object is equal to this grid geometry.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||