GeoAPI 1.0
Build 2004-05-18

org.opengis.go.geometry
Interface BoundingRectangle

All Superinterfaces:
Bounds

public interface BoundingRectangle
extends Bounds

BoundingRectangle defines a common abstraction for implementations of boundaries defined by a top-left DirectPosition and a bottom-right DirectPosition.

Version:
$Revision: 1.2 $, $Date: 2004/03/04 15:56:26 $
Author:
Open GIS Consortium, Inc.

Method Summary
 DirectPosition getBottomRight()
          Returns the DirectPosition for the bottom-right position of the rectangle.
 BoundingRectangle getCombinedExtent(BoundingRectangle bounds, BoundingRectangle result)
          Returns the smallest BoundingRectangle that contains both this BoundingRectangle and the BoundingRectangle passed in.
 BoundingRectangle getIntersection(BoundingRectangle bounds, BoundingRectangle result)
          Returns the BoundingRectangle of the intersection of this BoundingRectangle and the one passed in.
 DirectPosition getTopLeft()
          Returns the DirectPosition for the top-left position of the rectangle.
 void setBottomRight(DirectPosition coord)
          Sets the DirectPosition for the bottom-right position of the rectangle.
 void setTopLeft(DirectPosition coord)
          Sets the DirectPosition for the top-left position of the rectangle.
 
Methods inherited from interface Bounds
contains, expandToInclude, getCoordinateReferenceSystem, isValid, setCoordinateReferenceSystem, setValid
 

Method Detail

setTopLeft

void setTopLeft(DirectPosition coord)
Sets the DirectPosition for the top-left position of the rectangle.

Parameters:
coord - the top-left position.

getTopLeft

DirectPosition getTopLeft()
Returns the DirectPosition for the top-left position of the rectangle.

Returns:
the top-left position.

setBottomRight

void setBottomRight(DirectPosition coord)
Sets the DirectPosition for the bottom-right position of the rectangle.

Parameters:
coord - the bottom-right position.

getBottomRight

DirectPosition getBottomRight()
Returns the DirectPosition for the bottom-right position of the rectangle.

Returns:
the bottom-right position.

getIntersection

BoundingRectangle getIntersection(BoundingRectangle bounds,
                                  BoundingRectangle result)
Returns the BoundingRectangle of the intersection of this BoundingRectangle and the one passed in.

Parameters:
bounds - the BoundingRectangle to intersect with this BoundingRectangle.
result - An optional BoundingRectangle to hold the result of this operation. If result is null, this method will create a new BoundingRectangle to return.
Returns:
the intersection in the form of a BoundingRectangle, which may be invalid (according to the isValid() function) if the two BoundingRectangles do not intersect. The return value should never be null.

getCombinedExtent

BoundingRectangle getCombinedExtent(BoundingRectangle bounds,
                                    BoundingRectangle result)
Returns the smallest BoundingRectangle that contains both this BoundingRectangle and the BoundingRectangle passed in.

Parameters:
bounds - the BoundingRectangle to combine with this BoundingRectangle.
result - An optional BoundingRectangle to hold the result of this operation. If result is null, this method will create a new BoundingRectangle to return.
Returns:
the combined extent in the form of a BoundingRectangle which may be invalid (according to the isValid() function) if it is not possible to construct a rectangle that encompasses both of the given rectangles. The return value should never be null.

GeoAPI 1.0
Build 2004-05-18

Symbols, terms and definitions
Copyright OpenGIS® Consortium