|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.geom.RectangularShape
java.awt.geom.Rectangle2D
java.awt.Rectangle
org.geotools.coverage.grid.GridEnvelope2D
public class GridEnvelope2D
Defines a range of two-dimensional grid coverage coordinates. This implementation extends
Rectangle
for interoperability with Java2D. Note that at the opposite of
GeneralGridEnvelope
, this class is mutable.
CAUTION:
ISO 19123 defines high coordinates as inclusive.
We follow this specification for all getters methods, but keep in mind that this is the
opposite of Java2D usage where Rectangle
maximal values are exclusive.
GeneralGridEnvelope
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D |
---|
java.awt.geom.Rectangle2D.Double, java.awt.geom.Rectangle2D.Float |
Field Summary |
---|
Fields inherited from class java.awt.Rectangle |
---|
height, width, x, y |
Fields inherited from class java.awt.geom.Rectangle2D |
---|
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP |
Constructor Summary | |
---|---|
GridEnvelope2D()
Creates an initially empty grid envelope. |
|
GridEnvelope2D(int x,
int y,
int width,
int height)
Creates a grid envelope initialized to the specified rectangle. |
|
GridEnvelope2D(java.awt.Rectangle rectangle)
Creates a grid envelope initialized to the specified rectangle. |
Method Summary | |
---|---|
GridEnvelope2D |
clone()
Returns a clone of this grid envelope. |
int |
getDimension()
Returns the number of dimensions, which is always 2. |
GridCoordinates2D |
getHigh()
Returns the valid maximum inclusive grid coordinates. |
int |
getHigh(int dimension)
Returns the valid maximum inclusive grid coordinate along the specified dimension. |
GridCoordinates2D |
getLow()
Returns the valid minimum inclusive grid coordinates. |
int |
getLow(int dimension)
Returns the valid minimum inclusive grid coordinate along the specified dimension. |
int |
getSpan(int dimension)
Returns the number of integer grid coordinates along the specified dimension. |
java.lang.String |
toString()
Returns a string représentation of this grid envelope. |
Methods inherited from class java.awt.Rectangle |
---|
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, translate, union |
Methods inherited from class java.awt.geom.Rectangle2D |
---|
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union |
Methods inherited from class java.awt.geom.RectangularShape |
---|
contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.Shape |
---|
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects |
Constructor Detail |
---|
public GridEnvelope2D()
public GridEnvelope2D(java.awt.Rectangle rectangle)
rectangle
- The rectangle to use for initializing this grid envelope.public GridEnvelope2D(int x, int y, int width, int height)
x
- The minimal x ordinate.y
- The minimal y ordinate.width
- The number of valid ordinates along the x axis.height
- The number of valid ordinates along the y axis.Method Detail |
---|
public final int getDimension()
getDimension
in interface org.opengis.coverage.grid.GridEnvelope
public GridCoordinates2D getLow()
getLow
in interface org.opengis.coverage.grid.GridEnvelope
public GridCoordinates2D getHigh()
getHigh
in interface org.opengis.coverage.grid.GridEnvelope
public int getLow(int dimension)
getLow
in interface org.opengis.coverage.grid.GridEnvelope
getLow()
public int getHigh(int dimension)
getHigh
in interface org.opengis.coverage.grid.GridEnvelope
getHigh()
public int getSpan(int dimension)
getHigh(dimension) - getLow(dimension)
.
getSpan
in interface org.opengis.coverage.grid.GridEnvelope
public java.lang.String toString()
toString
in class java.awt.Rectangle
public GridEnvelope2D clone()
clone
in class java.awt.geom.RectangularShape
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |