GeoAPI 1.0
Build 2004-05-18

org.opengis.go.geometry
Interface Bounds

All Known Subinterfaces:
BoundingPolygon, BoundingRectangle

public interface Bounds

The Bounds interface serves as the base interface for all objects that represent a geometric boundary of some kind. The implementation of the contains method should determine whether a given point lies inside or outside of this boundary.

Version:
$Revision: 1.3 $, $Date: 2004/05/06 15:51:50 $
Author:
Open GIS Consortium, Inc.

Method Summary
 boolean contains(DirectPosition location)
          This function determines if the given point lies within the boundary represented by this object.
 void expandToInclude(DirectPosition location)
          Calling this method should enlarge the boundary represented by this object such that it includes the given point.
 CoordinateReferenceSystem getCoordinateReferenceSystem()
          Returns the Coordinate Reference System for this Bounds.
 boolean isValid()
          This function returns true if two conditions are met: first, that the object has been initialized with valid values; and second, that those values form a valid, non-empty boundary.
 void setCoordinateReferenceSystem(CoordinateReferenceSystem crs)
          Sets the Coordinate Reference System for this Bounds.
 void setValid(boolean newValue)
          This function sets a flag that indicates whether or not this object represents a valid boundary.
 

Method Detail

isValid

boolean isValid()
This function returns true if two conditions are met: first, that the object has been initialized with valid values; and second, that those values form a valid, non-empty boundary. What constitutes a "valid" boundary will depend on the particular subclass of Bounds and may depend on the types of coordinates used or the coordinate space in which they reside. An XY bounding rectangle on a map canvas may not be valid if its "upper left" is to the right of its "lower right".


setValid

void setValid(boolean newValue)
This function sets a flag that indicates whether or not this object represents a valid boundary. This function should be used by code that manipulates bounds objects to indicate whether the return value of an operation is invalid (e.g. the intersection of two rectangles that do not overlap) or valid.


contains

boolean contains(DirectPosition location)
This function determines if the given point lies within the boundary represented by this object.

Returns:
true if the point lies inside; false otherwise.

expandToInclude

void expandToInclude(DirectPosition location)
Calling this method should enlarge the boundary represented by this object such that it includes the given point.

Parameters:
location - The location to include.

getCoordinateReferenceSystem

CoordinateReferenceSystem getCoordinateReferenceSystem()
Returns the Coordinate Reference System for this Bounds. Used by subclasses of Bounds.

Returns:
the Coordinate Reference System for this Bounds.

setCoordinateReferenceSystem

void setCoordinateReferenceSystem(CoordinateReferenceSystem crs)
Sets the Coordinate Reference System for this Bounds. Used by subclasses of Bounds.

Parameters:
crs - the Coordinate Reference System for this Bounds.

GeoAPI 1.0
Build 2004-05-18

Symbols, terms and definitions
Copyright OpenGIS® Consortium