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

org.deegree.geometry.standard
Class DefaultEnvelope

java.lang.Object
  extended by org.deegree.geometry.standard.AbstractDefaultGeometry
      extended by org.deegree.geometry.standard.DefaultEnvelope
All Implemented Interfaces:
Envelope, Geometry, GMLObject

public class DefaultEnvelope
extends AbstractDefaultGeometry
implements Envelope

Default implementation of Envelope.

Version:
$Revision:$, $Date:$
Author:
Markus Schneider , last edited by: $Author:$

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.deegree.geometry.Geometry
Geometry.GeometryType
 
Field Summary
 
Fields inherited from class org.deegree.geometry.standard.AbstractDefaultGeometry
crs, id, jtsFactory, jtsGeometry, pm
 
Constructor Summary
DefaultEnvelope(Point min, Point max)
          Creates a new DefaultEnvelope instance with no id, crs and precisionmodel.
DefaultEnvelope(String id, CRS crs, PrecisionModel pm, Point min, Point max)
          Creates a new DefaultEnvelope instance from the given parameters.
 
Method Summary
protected  com.vividsolutions.jts.geom.Polygon buildJTSGeometry()
           
 Point getCentroid()
          Returns the centroid of the geometry.
 int getCoordinateDimension()
          Returns the coordinate dimension, i.e. the dimension of the space that the geometry is embedded in.
 Envelope getEnvelope()
          Returns the minimal bounding box of the geometry.
 Geometry.GeometryType getGeometryType()
          Must always return Geometry.GeometryType.ENVELOPE.
 Point getMax()
          Returns the envelope's maximum coordinate
 Point getMin()
          Returns the envelope's minimum coordinate.
 double getSpan(int dim)
          Returns the envelope's span of the second dimension (in units of the associated coordinate system).
 double getSpan0()
          Returns the envelope's span of the first dimension (in units of the associated coordinate system).
 double getSpan1()
          Returns the envelope's span of the second dimension (in units of the associated coordinate system).
 Envelope merge(Envelope other)
          Merges this envelope with another envelope into a new one.
 String toString()
           
 
Methods inherited from class org.deegree.geometry.standard.AbstractDefaultGeometry
contains, createFromJTS, crosses, equals, getAsDefaultGeometry, getBuffer, getConvexHull, getCoordinateSystem, getDifference, getDistance, getGMLProperties, getId, getIntersection, getJTSGeometry, getPrecision, getUnion, intersects, isBeyond, isDisjoint, isWithin, isWithinDistance, overlaps, setCoordinateSystem, setGMLProperties, setId, setPrecision, touches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree.geometry.Geometry
contains, crosses, equals, getBuffer, getConvexHull, getCoordinateSystem, getDifference, getDistance, getId, getIntersection, getPrecision, getUnion, intersects, isBeyond, isDisjoint, isWithin, isWithinDistance, overlaps, setCoordinateSystem, setGMLProperties, setId, setPrecision, touches
 
Methods inherited from interface org.deegree.gml.GMLObject
getGMLProperties
 

Constructor Detail

DefaultEnvelope

public DefaultEnvelope(Point min,
                       Point max)
Creates a new DefaultEnvelope instance with no id, crs and precisionmodel.

Parameters:
min -
max -

DefaultEnvelope

public DefaultEnvelope(String id,
                       CRS crs,
                       PrecisionModel pm,
                       Point min,
                       Point max)
Creates a new DefaultEnvelope instance from the given parameters.

Parameters:
id - identifier, may be null
crs - coordinate reference system, may be null
pm - precision model, may be null
min -
max -
Method Detail

getCoordinateDimension

public int getCoordinateDimension()
Description copied from interface: Geometry
Returns the coordinate dimension, i.e. the dimension of the space that the geometry is embedded in.

Specified by:
getCoordinateDimension in interface Geometry
Returns:
the coordinate dimension

getGeometryType

public Geometry.GeometryType getGeometryType()
Description copied from interface: Envelope
Must always return Geometry.GeometryType.ENVELOPE.

Specified by:
getGeometryType in interface Envelope
Specified by:
getGeometryType in interface Geometry
Returns:
Geometry.GeometryType.ENVELOPE.

getMax

public Point getMax()
Description copied from interface: Envelope
Returns the envelope's maximum coordinate

Specified by:
getMax in interface Envelope
Returns:
maximum coordinate

getMin

public Point getMin()
Description copied from interface: Envelope
Returns the envelope's minimum coordinate.

Specified by:
getMin in interface Envelope
Returns:
minimum coordinate

getSpan0

public double getSpan0()
Description copied from interface: Envelope
Returns the envelope's span of the first dimension (in units of the associated coordinate system).

Specified by:
getSpan0 in interface Envelope
Returns:
span of the first dimension

getSpan1

public double getSpan1()
Description copied from interface: Envelope
Returns the envelope's span of the second dimension (in units of the associated coordinate system).

Specified by:
getSpan1 in interface Envelope
Returns:
span of the second dimension

getSpan

public double getSpan(int dim)
Description copied from interface: Envelope
Returns the envelope's span of the second dimension (in units of the associated coordinate system).

Specified by:
getSpan in interface Envelope
Parameters:
dim - index of the span to be returned
Returns:
span of the specified dimension

merge

public Envelope merge(Envelope other)
Description copied from interface: Envelope
Merges this envelope with another envelope into a new one.

Specified by:
merge in interface Envelope
Returns:
merged envelope

getEnvelope

public Envelope getEnvelope()
Description copied from interface: Geometry
Returns the minimal bounding box of the geometry.

Specified by:
getEnvelope in interface Geometry
Overrides:
getEnvelope in class AbstractDefaultGeometry
Returns:
the minimal bounding box of the geometry

getCentroid

public Point getCentroid()
Description copied from interface: Geometry
Returns the centroid of the geometry.

Specified by:
getCentroid in interface Geometry
Overrides:
getCentroid in class AbstractDefaultGeometry
Returns:
a Point that is the centroid of this geometry

buildJTSGeometry

protected com.vividsolutions.jts.geom.Polygon buildJTSGeometry()
Overrides:
buildJTSGeometry in class AbstractDefaultGeometry

toString

public String toString()
Overrides:
toString in class AbstractDefaultGeometry

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

]]>