org.geotools.data.ows
Class CRSEnvelope

java.lang.Object
  extended by org.geotools.data.ows.CRSEnvelope
All Implemented Interfaces:
org.opengis.geometry.Envelope

public class CRSEnvelope
extends java.lang.Object
implements org.opengis.geometry.Envelope

A pair of coordinates and a reference system that represents a section of the Earth

Author:
Richard Gould

Field Summary
protected  double maxX
           
protected  double maxY
           
protected  double minX
           
protected  double minY
           
 
Constructor Summary
CRSEnvelope()
          Construct an empty BoundingBox
CRSEnvelope(org.opengis.geometry.Envelope envelope)
           
CRSEnvelope(java.lang.String epsgCode, double minX, double minY, double maxX, double maxY)
          Create a bounding box with the specified properties
 
Method Summary
 double getCenter(int dimension)
           
 org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
          Returns the coordinate reference system for this envelope (if known).
 int getDimension()
           
 java.lang.String getEPSGCode()
           
 double getLength(int dimension)
           
 org.opengis.geometry.DirectPosition getLowerCorner()
           
 double getMaximum(int dimension)
           
 double getMaxX()
          The maxX value is the higher X coordinate value
 double getMaxY()
          The maxY value is the higher Y coordinate value
 double getMedian(int dimension)
           
 double getMinimum(int dimension)
           
 double getMinX()
          The minX value is the lower X coordinate value
 double getMinY()
          The minY value is the lower Y coordinate value
 double getSpan(int dimension)
           
 java.lang.String getSRSName()
          The CRS is bounding box's Coordinate Reference System
 org.opengis.geometry.DirectPosition getUpperCorner()
           
 void setEPSGCode(java.lang.String epsgCode)
           
 void setMaxX(double maxX)
          The maxX value is the higher X coordinate value
 void setMaxY(double maxY)
          The maxY value is the higher Y coordinate value
 void setMinX(double minX)
          The minX value is the lower X coordinate value
 void setMinY(double minY)
          The minY value is the lower Y coordinate value
 void setSRSName(java.lang.String epsgCode)
          The CRS is bounding box's Coordinate Reference System
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

minX

protected double minX

minY

protected double minY

maxX

protected double maxX

maxY

protected double maxY
Constructor Detail

CRSEnvelope

public CRSEnvelope()
Construct an empty BoundingBox


CRSEnvelope

public CRSEnvelope(java.lang.String epsgCode,
                   double minX,
                   double minY,
                   double maxX,
                   double maxY)
Create a bounding box with the specified properties

Parameters:
epsgCode - The Coordinate Reference System this bounding box is in
minX -
minY -
maxX -
maxY -

CRSEnvelope

public CRSEnvelope(org.opengis.geometry.Envelope envelope)
Method Detail

getCoordinateReferenceSystem

public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
Returns the coordinate reference system for this envelope (if known). return CoordinateReferenceSystem if known, or null

Specified by:
getCoordinateReferenceSystem in interface org.opengis.geometry.Envelope

getSRSName

public java.lang.String getSRSName()
The CRS is bounding box's Coordinate Reference System

Returns:
the CRS/SRS value

setEPSGCode

public void setEPSGCode(java.lang.String epsgCode)
See Also:
setSRSName

getEPSGCode

public java.lang.String getEPSGCode()
See Also:
getSRSName

setSRSName

public void setSRSName(java.lang.String epsgCode)
The CRS is bounding box's Coordinate Reference System

Parameters:
srsName - The SRSName for this envelope; usually an EPSG code

getDimension

public int getDimension()
Specified by:
getDimension in interface org.opengis.geometry.Envelope

getMinimum

public double getMinimum(int dimension)
Specified by:
getMinimum in interface org.opengis.geometry.Envelope

getMaximum

public double getMaximum(int dimension)
Specified by:
getMaximum in interface org.opengis.geometry.Envelope

getCenter

public double getCenter(int dimension)
Specified by:
getCenter in interface org.opengis.geometry.Envelope

getMedian

public double getMedian(int dimension)
Specified by:
getMedian in interface org.opengis.geometry.Envelope

getLength

public double getLength(int dimension)
Specified by:
getLength in interface org.opengis.geometry.Envelope

getSpan

public double getSpan(int dimension)
Specified by:
getSpan in interface org.opengis.geometry.Envelope

getUpperCorner

public org.opengis.geometry.DirectPosition getUpperCorner()
Specified by:
getUpperCorner in interface org.opengis.geometry.Envelope

getLowerCorner

public org.opengis.geometry.DirectPosition getLowerCorner()
Specified by:
getLowerCorner in interface org.opengis.geometry.Envelope

getMaxX

public double getMaxX()
The maxX value is the higher X coordinate value

Returns:
the bounding box's maxX value

setMaxX

public void setMaxX(double maxX)
The maxX value is the higher X coordinate value

Parameters:
maxX - the new value for maxX. Should be greater than minX.

getMaxY

public double getMaxY()
The maxY value is the higher Y coordinate value

Returns:
the bounding box's maxY value

setMaxY

public void setMaxY(double maxY)
The maxY value is the higher Y coordinate value

Parameters:
maxY - the new value for maxY. Should be greater than minY.

getMinX

public double getMinX()
The minX value is the lower X coordinate value

Returns:
the bounding box's minX value

setMinX

public void setMinX(double minX)
The minX value is the lower X coordinate value

Parameters:
minX - the new value for minX. Should be less than maxX.

getMinY

public double getMinY()
The minY value is the lower Y coordinate value

Returns:
the bounding box's minY value

setMinY

public void setMinY(double minY)
The minY value is the lower Y coordinate value

Parameters:
minY - the new value for minY. Should be less than maxY.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 1996-2010 Geotools. All Rights Reserved.