| java.awt.geom.Rectangle2D org.geotools.geometry.Envelope2D
Envelope2D | public class Envelope2D extends Rectangle2D.Double implements Envelope,Cloneable(Code) | | A two-dimensional envelope on top of
Rectangle2D . This implementation is provided for
interoperability between Java2D and GeoAPI.
Note: This class inherits
and
fields. But
despite their names, they don't need to be oriented toward
and
respectively. The (x,y) axis
can have any orientation and should be understood as "ordinate 0" and "ordinate 1" values
instead. This is not specific to this implementation; in Java2D too, the visual axis orientation
depend on the
.
since: 2.1 version: $Id: Envelope2D.java 26137 2007-07-03 17:59:44Z desruisseaux $ author: Martin Desruisseaux See Also: GeneralEnvelope See Also: org.geotools.geometry.jts.ReferencedEnvelope See Also: org.opengis.metadata.extent.GeographicBoundingBox |
Constructor Summary | |
public | Envelope2D(Envelope envelope) Constructs two-dimensional envelope defined by an other
Envelope . | public | Envelope2D(CoordinateReferenceSystem crs, Rectangle2D rect) Constructs two-dimensional envelope defined by an other
Rectangle2D . | public | Envelope2D(CoordinateReferenceSystem crs, double x, double y, double width, double height) Constructs two-dimensional envelope defined by the specified coordinates. | public | Envelope2D(DirectPosition2D minDP, DirectPosition2D maxDP) Constructs two-dimensional envelope defined by the specified coordinates. |
Method Summary | |
public boolean | boundsEquals(Envelope that, int xDim, int yDim, double eps) Returns
true if
this envelope bounds is equals to
that envelope
bounds in two specified dimensions. | public boolean | equals(Object object) Compares the specified object with this envelope for equality. | final public double | getCenter(int dimension) Returns the center ordinate along the specified dimension. | final public CoordinateReferenceSystem | getCoordinateReferenceSystem() Returns the coordinate reference system in which the coordinates are given. | final public int | getDimension() Returns the number of dimensions. | final public double | getLength(int dimension) Returns the envelope length along the specified dimension. | public DirectPosition | getLowerCorner() A coordinate position consisting of all the minimal ordinates for each
dimension for all points within the
Envelope . | final public double | getMaximum(int dimension) Returns the maximal ordinate along the specified dimension. | final public double | getMinimum(int dimension) Returns the minimal ordinate along the specified dimension. | public DirectPosition | getUpperCorner() A coordinate position consisting of all the maximal ordinates for each
dimension for all points within the
Envelope . | public int | hashCode() Returns a hash value for this envelope. | public void | setCoordinateReferenceSystem(CoordinateReferenceSystem crs) Set the coordinate reference system in which the coordinate are given. | public String | toString() Returns a string representation of this envelope. |
Envelope2D | public Envelope2D(Envelope envelope)(Code) | | Constructs two-dimensional envelope defined by an other
Envelope .
|
Envelope2D | public Envelope2D(CoordinateReferenceSystem crs, Rectangle2D rect)(Code) | | Constructs two-dimensional envelope defined by an other
Rectangle2D .
|
Envelope2D | public Envelope2D(CoordinateReferenceSystem crs, double x, double y, double width, double height)(Code) | | Constructs two-dimensional envelope defined by the specified coordinates. Despite
their name, the (x,y) coordinates don't need to be oriented
toward (
,
).
Those parameter names simply match the
and
fields.
The actual axis orientations are determined by the specified CRS.
See the
for details.
|
Envelope2D | public Envelope2D(DirectPosition2D minDP, DirectPosition2D maxDP) throws MismatchedReferenceSystemException(Code) | | Constructs two-dimensional envelope defined by the specified coordinates. Despite
their name, the (x,y) coordinates don't need to be oriented
toward (
,
).
Those parameter names simply match the
and
fields.
The actual axis orientations are determined by the specified CRS.
See the
for details.
The
minDP and
maxDP arguments usually contains the minimal and maximal
ordinate values respectively, but this is not mandatory. The ordinates will be rearanged
as needed.
Parameters: minDP - The fist position. Parameters: maxDP - The second position. throws: MismatchedReferenceSystemException - if the two positions don't use the same CRS. since: 2.4 |
boundsEquals | public boolean boundsEquals(Envelope that, int xDim, int yDim, double eps)(Code) | | Returns
true if
this envelope bounds is equals to
that envelope
bounds in two specified dimensions. The coordinate reference system is not compared, since
it doesn't need to have the same number of dimensions.
Parameters: that - The envelope to compare to. Parameters: xDim - The dimension of that envelope to compare to the x dimensionof this envelope. Parameters: yDim - The dimension of that envelope to compare to the y dimensionof this envelope. Parameters: eps - A small tolerance number for floating point number comparaisons. This value willbe scaled according this envelope and. true if the envelope bounds are the same (up to the specified tolerancelevel) in the specified dimensions, or false otherwise. |
equals | public boolean equals(Object object)(Code) | | Compares the specified object with this envelope for equality.
|
getCenter | final public double getCenter(int dimension)(Code) | | Returns the center ordinate along the specified dimension.
|
getCoordinateReferenceSystem | final public CoordinateReferenceSystem getCoordinateReferenceSystem()(Code) | | Returns the coordinate reference system in which the coordinates are given.
The coordinate reference system, or null . |
getDimension | final public int getDimension()(Code) | | Returns the number of dimensions.
|
getLength | final public double getLength(int dimension)(Code) | | Returns the envelope length along the specified dimension.
This length is equals to the maximum ordinate minus the
minimal ordinate.
|
getLowerCorner | public DirectPosition getLowerCorner()(Code) | | A coordinate position consisting of all the minimal ordinates for each
dimension for all points within the
Envelope .
The lower corner.DirectPosition2D |
getMaximum | final public double getMaximum(int dimension)(Code) | | Returns the maximal ordinate along the specified dimension.
|
getMinimum | final public double getMinimum(int dimension)(Code) | | Returns the minimal ordinate along the specified dimension.
|
getUpperCorner | public DirectPosition getUpperCorner()(Code) | | A coordinate position consisting of all the maximal ordinates for each
dimension for all points within the
Envelope .
The upper corner.DirectPosition2D |
hashCode | public int hashCode()(Code) | | Returns a hash value for this envelope. This value need not remain consistent between
different implementations of the same class.
|
setCoordinateReferenceSystem | public void setCoordinateReferenceSystem(CoordinateReferenceSystem crs)(Code) | | Set the coordinate reference system in which the coordinate are given.
Parameters: crs - The new coordinate reference system, or null . |
toString | public String toString()(Code) | | Returns a string representation of this envelope. The default implementation is okay
for occasional formatting (for example for debugging purpose). But if there is a lot
of envelopes to format, users will get more control by using their own instance of
org.geotools.measure.CoordinateFormat .
since: 2.4 |
Methods inherited from java.awt.geom.Rectangle2D | public void add(double newx, double newy)(Code)(Java Doc) public void add(Point2D pt)(Code)(Java Doc) public void add(Rectangle2D r)(Code)(Java Doc) public boolean contains(double x, double y)(Code)(Java Doc) public boolean contains(double x, double y, double w, double h)(Code)(Java Doc) abstract public Rectangle2D createIntersection(Rectangle2D r)(Code)(Java Doc) abstract public Rectangle2D createUnion(Rectangle2D r)(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) public Rectangle2D getBounds2D()(Code)(Java Doc) public PathIterator getPathIterator(AffineTransform at)(Code)(Java Doc) public PathIterator getPathIterator(AffineTransform at, double flatness)(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public static void intersect(Rectangle2D src1, Rectangle2D src2, Rectangle2D dest)(Code)(Java Doc) public boolean intersects(double x, double y, double w, double h)(Code)(Java Doc) public boolean intersectsLine(double x1, double y1, double x2, double y2)(Code)(Java Doc) public boolean intersectsLine(Line2D l)(Code)(Java Doc) abstract public int outcode(double x, double y)(Code)(Java Doc) public int outcode(Point2D p)(Code)(Java Doc) public void setFrame(double x, double y, double w, double h)(Code)(Java Doc) abstract public void setRect(double x, double y, double w, double h)(Code)(Java Doc) public void setRect(Rectangle2D r)(Code)(Java Doc) public static void union(Rectangle2D src1, Rectangle2D src2, Rectangle2D dest)(Code)(Java Doc)
|
|
|