deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.coverage.raster.geom
Class RasterRect

java.lang.Object
  extended by org.deegree.coverage.raster.geom.RasterRect
Direct Known Subclasses:
DataView

public class RasterRect
extends Object

Simple data structure for a raster rectangle. Stores upper-left pixel coordinate and width and height.

Version:
$Revision:11404 $, $Date:2008-04-23 15:38:27 +0200 (Mi, 23 Apr 2008) $
Author:
Oliver Tonnhofer, last edited by: $Author:rbezema $

Field Summary
 int height
          The height in pixel.
 int width
          The width in pixel.
 int x
          The x pixel position.
 int y
          The y pixel position.
 
Constructor Summary
RasterRect()
          Creates a new RasterRect with position 0, 0 and size 0, 0.
RasterRect(int x, int y, int width, int height)
          Creates a new RasterRect
RasterRect(Rectangle rect)
           
 
Method Summary
 boolean equals(Object other)
           
static RasterRect intersection(RasterRect first, RasterRect second)
          Create an intersection of the given RasterRects, if the given rasterects do not intersect, null will be returned.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public int x
The x pixel position.


y

public int y
The y pixel position.


width

public int width
The width in pixel.


height

public int height
The height in pixel.

Constructor Detail

RasterRect

public RasterRect(int x,
                  int y,
                  int width,
                  int height)
Creates a new RasterRect

Parameters:
x - upper-left pixel
y - upper-left pixel
width - width of rectangle
height - height of rectangle

RasterRect

public RasterRect()
Creates a new RasterRect with position 0, 0 and size 0, 0.


RasterRect

public RasterRect(Rectangle rect)
Parameters:
rect - to copy data of.
Method Detail

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

intersection

public static final RasterRect intersection(RasterRect first,
                                            RasterRect second)
Create an intersection of the given RasterRects, if the given rasterects do not intersect, null will be returned.

Parameters:
first -
second -
Returns:
the intersection or null if the given rectangles do not intersect.

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>