org.geotools.geometry.jts
Class ReferencedEnvelope3D

Object
  extended by Envelope
      extended by ReferencedEnvelope
          extended by ReferencedEnvelope3D
All Implemented Interfaces:
Serializable, BoundingBox, BoundingBox3D, Envelope

public class ReferencedEnvelope3D
extends ReferencedEnvelope
implements BoundingBox3D

A 3D envelope associated with a coordinate reference system. In addition, this JTS envelope also implements the GeoAPI envelope interface for interoperability with GeoAPI.

Author:
Niels Charlier
See Also:
Serialized Form

Field Summary
static ReferencedEnvelope3D EVERYTHING
          A ReferencedEnvelope containing "everything"
 
Fields inherited from class ReferencedEnvelope
crs
 
Constructor Summary
ReferencedEnvelope3D()
          Creates a null envelope with a null coordinate reference system.
ReferencedEnvelope3D(BoundingBox3D bbox)
          Creates a new envelope from an existing bounding box.
ReferencedEnvelope3D(CoordinateReferenceSystem crs)
          Creates a null envelope with the specified coordinate reference system.
ReferencedEnvelope3D(double x1, double x2, double y1, double y2, double z1, double z2, CoordinateReferenceSystem crs)
          Creates an envelope for a region defined by maximum and minimum values.
ReferencedEnvelope3D(Envelope envelope)
          Creates a new envelope from an existing OGC envelope.
ReferencedEnvelope3D(Envelope envelope, CoordinateReferenceSystem crs)
          Creates a new envelope from an existing JTS envelope.
ReferencedEnvelope3D(ReferencedEnvelope3D envelope)
          Creates a new envelope from an existing envelope.
ReferencedEnvelope3D(ReferencedEnvelope3D envelope, CoordinateReferenceSystem crs)
          Creates a new envelope from an existing JTS envelope.
 
Method Summary
 boolean boundsEquals3D(Envelope other, double eps)
          Compare the bounds of this envelope with those of another.
 Coordinate centre()
          Computes the coordinate of the centre of this envelope (as long as it is non-null
 boolean contains(BoundingBox3D bbox)
          Returns true if the provided bounds are contained by this bounding box.
 boolean contains(Coordinate p)
          Tests if the given point lies in or on the envelope.
 boolean contains(DirectPosition pos)
          Returns true if the provided location is contained by this bounding box.
 boolean contains(double x, double y, double z)
          Tests if the given point lies in or on the envelope.
 boolean covers(Coordinate p)
          Tests if the given point lies in or on the envelope.
 boolean covers(double x, double y, double z)
          Tests if the given point lies in or on the envelope.
 boolean covers(ReferencedEnvelope3D other)
          Tests if the Envelope other lies wholely inside this Envelope (inclusive of the boundary).
 double distance(ReferencedEnvelope3D env)
          Computes the distance between this and another Envelope.
 boolean equals(Object other)
          Compares the specified object with this envelope for equality.
 void expandBy(double distance)
          Expands this envelope by a given distance in all directions.
 void expandBy(double deltaX, double deltaY, double deltaZ)
          Expands this envelope by a given distance in all directions.
 void expandToInclude(Coordinate p)
          Enlarges this Envelope so that it contains the given Coordinate.
 void expandToInclude(DirectPosition pt)
          Expand to include the provided DirectPosition
 void expandToInclude(double x, double y, double z)
          Enlarges this Envelope so that it contains the given point.
 void expandToInclude(ReferencedEnvelope3D other)
          Enlarges this Envelope so that it contains the other Envelope.
 double getDepth()
          Returns the difference between the maximum and minimum z values.
 int getDimension()
          Returns the number of dimensions.
 DirectPosition getLowerCorner()
          A coordinate position consisting of all the minimal ordinates for each dimension for all points within the Envelope.
 double getMaximum(int dimension)
          Returns the maximal ordinate along the specified dimension.
 double getMaxZ()
          Returns the Envelopes maximum z-value. min z > max z indicates that this is a null Envelope.
 double getMedian(int dimension)
          Returns the center ordinate along the specified dimension.
 double getMinimum(int dimension)
          Returns the minimal ordinate along the specified dimension.
 double getMinZ()
          Returns the Envelopes minimum z-value. min z > max z indicates that this is a null Envelope.
 double getSpan(int dimension)
          Returns the envelope length along the specified dimension.
 DirectPosition getUpperCorner()
          A coordinate position consisting of all the maximal ordinates for each dimension for all points within the Envelope.
 double getVolume()
          Gets the volume of this envelope.
 int hashCode()
          Returns a hash value for this envelope.
 void include(BoundingBox3D bbox)
          Include the provided bounding box, expanding as necessary.
 void include(double x, double y)
          Include the provided coordinates, expanding as necessary.
 void include(double x, double y, double z)
          Include the provided coordinates, expanding as necessary.
 void init()
          Initialize to a null Envelope.
 void init(BoundingBox bounds)
          Sets this envelope to the specified bounding box.
 void init(Coordinate p)
          Initialize an Envelope to a region defined by a single Coordinate.
 void init(Coordinate p1, Coordinate p2)
          Initialize an Envelope to a region defined by two Coordinates.
 void init(double x1, double x2, double y1, double y2, double z1, double z2)
          Initialize an Envelope for a region defined by maximum and minimum values.
 void init(Envelope env)
           
 void init(ReferencedEnvelope3D env)
          Initialize an Envelope from an existing 3D Envelope.
 ReferencedEnvelope3D intersection(ReferencedEnvelope3D env)
          Computes the intersection of two Envelopes.
 boolean intersects(BoundingBox3D bbox)
          Check if this bounding box intersects the provided bounds.
 boolean intersects(Coordinate p)
          Check if the point p overlaps (lies inside) the region of this Envelope.
static boolean intersects(Coordinate p1, Coordinate p2, Coordinate q)
          Test the point q to see whether it intersects the Envelope defined by p1-p2
static boolean intersects(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2)
          Test the envelope defined by p1-p2 for intersection with the envelope defined by q1-q2
 boolean intersects(double x, double y, double z)
          Check if the point (x, y) overlaps (lies inside) the region of this Envelope.
 boolean intersects(ReferencedEnvelope3D other)
          Check if the region defined by other overlaps (intersects) the region of this Envelope.
 boolean isEmpty()
          Returns true if lengths along all dimension are zero.
 double maxExtent()
          Gets the maximum extent of this envelope across both dimensions.
 double minExtent()
          Gets the minimum extent of this envelope across all three dimensions.
 boolean overlaps(Coordinate p)
          Deprecated. Use #intersects instead.
 boolean overlaps(double x, double y, double z)
          Deprecated. Use #intersects instead.
 boolean overlaps(ReferencedEnvelope3D other)
          Deprecated. Use #intersects instead. In the future, #overlaps may be changed to be a true overlap check; that is, whether the intersection is two-dimensional.
 void setBounds(BoundingBox3D bbox)
          Initialize the bounding box with another bounding box.
 void setToNull()
          Makes this Envelope a "null" envelope, that is, the envelope of the empty geometry.
 BoundingBox toBounds(CoordinateReferenceSystem targetCRS)
          Returns a new bounding box which contains the transformed shape of this bounding box.
 ReferencedEnvelope transform(CoordinateReferenceSystem targetCRS, boolean lenient)
          Transforms the referenced envelope to the specified coordinate reference system.
 ReferencedEnvelope transform(CoordinateReferenceSystem targetCRS, boolean lenient, int numPointsForTransformation)
          Transforms the referenced envelope to the specified coordinate reference system using the specified amount of points.
 void translate(double transX, double transY, double transZ)
          Translates this envelope by given amounts in the X and Y direction.
 
Methods inherited from class ReferencedEnvelope
boundsEquals2D, checkCoordinateReferenceSystemDimension, contains, create, create, create, create, create, crs, ensureCompatibleReferenceSystem, ensureCompatibleReferenceSystem, expandToInclude, getCenter, getCoordinateReferenceSystem, getLength, include, intersection, intersects, maxX, maxY, minX, minY, reference, reference, reference, reference, setBounds, toString
 
Methods inherited from class Envelope
contains, contains, covers, covers, distance, expandBy, expandToInclude, getArea, getHeight, getMaxX, getMaxY, getMinX, getMinY, getWidth, init, intersects, intersects, isNull, overlaps, overlaps, translate
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface BoundingBox
contains, contains, getHeight, getMaxX, getMaxY, getMinX, getMinY, getWidth, include, intersects, setBounds
 
Methods inherited from interface Envelope
getCoordinateReferenceSystem
 

Field Detail

EVERYTHING

public static ReferencedEnvelope3D EVERYTHING
A ReferencedEnvelope containing "everything"

Constructor Detail

ReferencedEnvelope3D

public ReferencedEnvelope3D()
Creates a null envelope with a null coordinate reference system.


ReferencedEnvelope3D

public ReferencedEnvelope3D(CoordinateReferenceSystem crs)
                     throws MismatchedDimensionException
Creates a null envelope with the specified coordinate reference system.

Parameters:
crs - The coordinate reference system.
Throws:
MismatchedDimensionException - if the CRS dimension is not valid.

ReferencedEnvelope3D

public ReferencedEnvelope3D(double x1,
                            double x2,
                            double y1,
                            double y2,
                            double z1,
                            double z2,
                            CoordinateReferenceSystem crs)
                     throws MismatchedDimensionException
Creates an envelope for a region defined by maximum and minimum values.

Parameters:
x1 - The first x-value.
x2 - The second x-value.
y1 - The first y-value.
y2 - The second y-value.
z1 - The first y-value.
z2 - The second y-value.
crs - The coordinate reference system.
Throws:
MismatchedDimensionException - if the CRS dimension is not valid.

ReferencedEnvelope3D

public ReferencedEnvelope3D(ReferencedEnvelope3D envelope)
                     throws MismatchedDimensionException
Creates a new envelope from an existing envelope.

Parameters:
envelope - The envelope to initialize from
Throws:
MismatchedDimensionException - if the CRS dimension is not valid.

ReferencedEnvelope3D

public ReferencedEnvelope3D(BoundingBox3D bbox)
                     throws MismatchedDimensionException
Creates a new envelope from an existing bounding box.

Parameters:
bbox - The bounding box to initialize from.
Throws:
MismatchedDimensionException - if the CRS dimension is not valid.

ReferencedEnvelope3D

public ReferencedEnvelope3D(Envelope envelope,
                            CoordinateReferenceSystem crs)
                     throws MismatchedDimensionException
Creates a new envelope from an existing JTS envelope.

Parameters:
envelope - The envelope to initialize from.
crs - The coordinate reference system.
Throws:
MismatchedDimensionExceptionif - the CRS dimension is not valid.
MismatchedDimensionException

ReferencedEnvelope3D

public ReferencedEnvelope3D(Envelope envelope)
                     throws MismatchedDimensionException
Creates a new envelope from an existing OGC envelope.

Parameters:
envelope - The envelope to initialize from.
Throws:
MismatchedDimensionException - if the CRS dimension is not valid.

ReferencedEnvelope3D

public ReferencedEnvelope3D(ReferencedEnvelope3D envelope,
                            CoordinateReferenceSystem crs)
                     throws MismatchedDimensionException
Creates a new envelope from an existing JTS envelope.

Parameters:
envelope - The envelope to initialize from.
crs - The coordinate reference system.
Throws:
MismatchedDimensionExceptionif - the CRS dimension is not valid.
MismatchedDimensionException
Method Detail

intersects

public static boolean intersects(Coordinate p1,
                                 Coordinate p2,
                                 Coordinate q)
Test the point q to see whether it intersects the Envelope defined by p1-p2

Parameters:
p1 - one extremal point of the envelope
p2 - another extremal point of the envelope
q - the point to test for intersection
Returns:
true if q intersects the envelope p1-p2

intersects

public static boolean intersects(Coordinate p1,
                                 Coordinate p2,
                                 Coordinate q1,
                                 Coordinate q2)
Test the envelope defined by p1-p2 for intersection with the envelope defined by q1-q2

Parameters:
p1 - one extremal point of the envelope P
p2 - another extremal point of the envelope P
q1 - one extremal point of the envelope Q
q2 - another extremal point of the envelope Q
Returns:
true if Q intersects P

init

public void init()
Initialize to a null Envelope.

Overrides:
init in class Envelope

init

public void init(double x1,
                 double x2,
                 double y1,
                 double y2,
                 double z1,
                 double z2)
Initialize an Envelope for a region defined by maximum and minimum values.

Parameters:
x1 - the first x-value
x2 - the second x-value
y1 - the first y-value
y2 - the second y-value
z1 - the first z-value
z2 - the second z-value

init

public void init(Coordinate p1,
                 Coordinate p2)
Initialize an Envelope to a region defined by two Coordinates.

Overrides:
init in class Envelope
Parameters:
p1 - the first Coordinate
p2 - the second Coordinate

init

public void init(Coordinate p)
Initialize an Envelope to a region defined by a single Coordinate.

Overrides:
init in class Envelope
Parameters:
p - the coordinate

init

public void init(Envelope env)
Overrides:
init in class Envelope

init

public void init(ReferencedEnvelope3D env)
Initialize an Envelope from an existing 3D Envelope.

Parameters:
env - the 3D Envelope to initialize from

setToNull

public void setToNull()
Makes this Envelope a "null" envelope, that is, the envelope of the empty geometry.

Overrides:
setToNull in class Envelope

getDepth

public double getDepth()
Returns the difference between the maximum and minimum z values.

Returns:
max z - min z, or 0 if this is a null Envelope

getMinZ

public double getMinZ()
Returns the Envelopes minimum z-value. min z > max z indicates that this is a null Envelope.

Specified by:
getMinZ in interface BoundingBox3D
Returns:
the minimum z-coordinate

getMaxZ

public double getMaxZ()
Returns the Envelopes maximum z-value. min z > max z indicates that this is a null Envelope.

Specified by:
getMaxZ in interface BoundingBox3D
Returns:
the maximum z-coordinate

getVolume

public double getVolume()
Gets the volume of this envelope.

Returns:
the volume of the envelope

minExtent

public double minExtent()
Gets the minimum extent of this envelope across all three dimensions.

Overrides:
minExtent in class Envelope
Returns:
the minimum extent of this envelope

maxExtent

public double maxExtent()
Gets the maximum extent of this envelope across both dimensions.

Overrides:
maxExtent in class Envelope
Returns:
the maximum extent of this envelope

expandToInclude

public void expandToInclude(Coordinate p)
Enlarges this Envelope so that it contains the given Coordinate. Has no effect if the point is already on or within the envelope.

Overrides:
expandToInclude in class Envelope
Parameters:
p - the Coordinate to expand to include

expandBy

public void expandBy(double distance)
Expands this envelope by a given distance in all directions. Both positive and negative distances are supported.

Overrides:
expandBy in class Envelope
Parameters:
distance - the distance to expand the envelope

expandBy

public void expandBy(double deltaX,
                     double deltaY,
                     double deltaZ)
Expands this envelope by a given distance in all directions. Both positive and negative distances are supported.

Parameters:
deltaX - the distance to expand the envelope along the the X axis
deltaY - the distance to expand the envelope along the the Y axis

expandToInclude

public void expandToInclude(double x,
                            double y,
                            double z)
Enlarges this Envelope so that it contains the given point. Has no effect if the point is already on or within the envelope.

Parameters:
x - the value to lower the minimum x to or to raise the maximum x to
y - the value to lower the minimum y to or to raise the maximum y to
z - the value to lower the minimum z to or to raise the maximum z to

expandToInclude

public void expandToInclude(DirectPosition pt)
Description copied from class: ReferencedEnvelope
Expand to include the provided DirectPosition

Overrides:
expandToInclude in class ReferencedEnvelope

translate

public void translate(double transX,
                      double transY,
                      double transZ)
Translates this envelope by given amounts in the X and Y direction.

Parameters:
transX - the amount to translate along the X axis
transY - the amount to translate along the Y axis
transZ - the amount to translate along the Z axis

centre

public Coordinate centre()
Computes the coordinate of the centre of this envelope (as long as it is non-null

Overrides:
centre in class Envelope
Returns:
the centre coordinate of this envelope null if the envelope is null

intersects

public boolean intersects(ReferencedEnvelope3D other)
Check if the region defined by other overlaps (intersects) the region of this Envelope.

Parameters:
other - the Envelope which this Envelope is being checked for overlapping
Returns:
true if the Envelopes overlap

overlaps

public boolean overlaps(ReferencedEnvelope3D other)
Deprecated. Use #intersects instead. In the future, #overlaps may be changed to be a true overlap check; that is, whether the intersection is two-dimensional.


intersects

public boolean intersects(Coordinate p)
Check if the point p overlaps (lies inside) the region of this Envelope.

Overrides:
intersects in class Envelope
Parameters:
p - the Coordinate to be tested
Returns:
true if the point overlaps this Envelope

overlaps

public boolean overlaps(Coordinate p)
Deprecated. Use #intersects instead.

Overrides:
overlaps in class Envelope

intersects

public boolean intersects(double x,
                          double y,
                          double z)
Check if the point (x, y) overlaps (lies inside) the region of this Envelope.

Parameters:
x - the x-ordinate of the point
y - the y-ordinate of the point
z - the z-ordinate of the point
Returns:
true if the point overlaps this Envelope

overlaps

public boolean overlaps(double x,
                        double y,
                        double z)
Deprecated. Use #intersects instead.


contains

public boolean contains(Coordinate p)
Tests if the given point lies in or on the envelope.

Note that this is not the same definition as the SFS contains, which would exclude the envelope boundary.

Overrides:
contains in class Envelope
Parameters:
p - the point which this Envelope is being checked for containing
Returns:
true if the point lies in the interior or on the boundary of this Envelope.
See Also:
covers(Coordinate)

contains

public boolean contains(double x,
                        double y,
                        double z)
Tests if the given point lies in or on the envelope.

Note that this is not the same definition as the SFS contains, which would exclude the envelope boundary.

Specified by:
contains in interface BoundingBox3D
Parameters:
x - the x-coordinate of the point which this Envelope is being checked for containing
y - the y-coordinate of the point which this Envelope is being checked for containing
z - The second ordinate value.
Returns:
true if (x, y) lies in the interior or on the boundary of this Envelope.
See Also:
Envelope.covers(double, double)

covers

public boolean covers(double x,
                      double y,
                      double z)
Tests if the given point lies in or on the envelope.

Parameters:
x - the x-coordinate of the point which this Envelope is being checked for containing
y - the y-coordinate of the point which this Envelope is being checked for containing
Returns:
true if (x, y) lies in the interior or on the boundary of this Envelope.

covers

public boolean covers(Coordinate p)
Tests if the given point lies in or on the envelope.

Overrides:
covers in class Envelope
Parameters:
p - the point which this Envelope is being checked for containing
Returns:
true if the point lies in the interior or on the boundary of this Envelope.

covers

public boolean covers(ReferencedEnvelope3D other)
Tests if the Envelope other lies wholely inside this Envelope (inclusive of the boundary).

Parameters:
other - the Envelope to check
Returns:
true if this Envelope covers the other

distance

public double distance(ReferencedEnvelope3D env)
Computes the distance between this and another Envelope. The distance between overlapping Envelopes is 0. Otherwise, the distance is the Euclidean distance between the closest points.


init

public void init(BoundingBox bounds)
Sets this envelope to the specified bounding box.

Overrides:
init in class ReferencedEnvelope

getDimension

public int getDimension()
Returns the number of dimensions.

Specified by:
getDimension in interface Envelope
Overrides:
getDimension in class ReferencedEnvelope
Returns:
The dimensionality of this envelope.

getMinimum

public double getMinimum(int dimension)
Returns the minimal ordinate along the specified dimension.

Specified by:
getMinimum in interface Envelope
Overrides:
getMinimum in class ReferencedEnvelope
Parameters:
dimension - The dimension for which to obtain the ordinate value.
Returns:
The minimal ordinate at the given dimension.
See Also:
RectangularShape.getMinX(), RectangularShape.getMinY()

getMaximum

public double getMaximum(int dimension)
Returns the maximal ordinate along the specified dimension.

Specified by:
getMaximum in interface Envelope
Overrides:
getMaximum in class ReferencedEnvelope
Parameters:
dimension - The dimension for which to obtain the ordinate value.
Returns:
The maximal ordinate at the given dimension.
See Also:
RectangularShape.getMaxX(), RectangularShape.getMaxY()

getMedian

public double getMedian(int dimension)
Returns the center ordinate along the specified dimension.

Specified by:
getMedian in interface Envelope
Overrides:
getMedian in class ReferencedEnvelope
Parameters:
dimension - The dimension for which to obtain the ordinate value.
Returns:
The median ordinate at the given dimension.
See Also:
RectangularShape.getCenterX(), RectangularShape.getCenterY()

getSpan

public double getSpan(int dimension)
Returns the envelope length along the specified dimension. This length is equals to the maximum ordinate minus the minimal ordinate.

Specified by:
getSpan in interface Envelope
Overrides:
getSpan in class ReferencedEnvelope
Parameters:
dimension - The dimension for which to obtain the ordinate value.
Returns:
The span (typically width or height) at the given dimension.
See Also:
RectangularShape.getWidth(), RectangularShape.getHeight()

getLowerCorner

public DirectPosition getLowerCorner()
A coordinate position consisting of all the minimal ordinates for each dimension for all points within the Envelope.

Specified by:
getLowerCorner in interface Envelope
Overrides:
getLowerCorner in class ReferencedEnvelope
Returns:
The lower corner.

getUpperCorner

public DirectPosition getUpperCorner()
A coordinate position consisting of all the maximal ordinates for each dimension for all points within the Envelope.

Specified by:
getUpperCorner in interface Envelope
Overrides:
getUpperCorner in class ReferencedEnvelope
Returns:
The upper corner.

isEmpty

public boolean isEmpty()
Returns true if lengths along all dimension are zero.

Specified by:
isEmpty in interface BoundingBox
Overrides:
isEmpty in class ReferencedEnvelope
Returns:
true if this bounding box is empty.

contains

public boolean contains(DirectPosition pos)
Returns true if the provided location is contained by this bounding box.

Specified by:
contains in interface BoundingBox
Overrides:
contains in class ReferencedEnvelope
Parameters:
pos - The direct position to test for inclusion.
Returns:
true if the given position is inside this bounds.

contains

public boolean contains(BoundingBox3D bbox)
Returns true if the provided bounds are contained by this bounding box.


intersects

public boolean intersects(BoundingBox3D bbox)
Check if this bounding box intersects the provided bounds.


intersection

public ReferencedEnvelope3D intersection(ReferencedEnvelope3D env)
Computes the intersection of two Envelopes.

Parameters:
env - the envelope to intersect with
Returns:
a new Envelope representing the intersection of the envelopes (this will be the null envelope if either argument is null, or they do not intersect

include

public void include(BoundingBox3D bbox)
Include the provided bounding box, expanding as necessary.


expandToInclude

public void expandToInclude(ReferencedEnvelope3D other)
Enlarges this Envelope so that it contains the other Envelope. Has no effect if other is wholly on or within the envelope.

Parameters:
other - the Envelope to expand to include

include

public void include(double x,
                    double y,
                    double z)
Include the provided coordinates, expanding as necessary.

Specified by:
include in interface BoundingBox3D
Parameters:
x - The first ordinate value.
y - The second ordinate value.
z - The third ordinate value.

setBounds

public void setBounds(BoundingBox3D bbox)
Initialize the bounding box with another bounding box.

Since:
2.4

toBounds

public BoundingBox toBounds(CoordinateReferenceSystem targetCRS)
                     throws TransformException
Returns a new bounding box which contains the transformed shape of this bounding box. This is a convenience method that delegate its work to the transform method.

Specified by:
toBounds in interface BoundingBox
Specified by:
toBounds in interface BoundingBox3D
Overrides:
toBounds in class ReferencedEnvelope
Parameters:
targetCRS - The target CRS for the bounding box to be returned.
Returns:
A new bounding box wich includes the shape of this box transformed to the specified target CRS.
Throws:
TransformException - if no transformation path has been found from this box CRS to the specified target CRS, or if the transformation failed for an other reason.

transform

public ReferencedEnvelope transform(CoordinateReferenceSystem targetCRS,
                                    boolean lenient)
                             throws TransformException,
                                    FactoryException
Transforms the referenced envelope to the specified coordinate reference system.

This method can handle the case where the envelope contains the North or South pole, or when it cross the ±180� longitude.

Overrides:
transform in class ReferencedEnvelope
Parameters:
targetCRS - The target coordinate reference system.
lenient - true if datum shift should be applied even if there is insuffisient information. Otherwise (if false), an exception is thrown in such case.
Returns:
The transformed envelope.
Throws:
FactoryException - if the math transform can't be determined.
TransformException - if at least one coordinate can't be transformed.
See Also:
CRS.transform(CoordinateOperation, org.opengis.geometry.Envelope)

transform

public ReferencedEnvelope transform(CoordinateReferenceSystem targetCRS,
                                    boolean lenient,
                                    int numPointsForTransformation)
                             throws TransformException,
                                    FactoryException
Transforms the referenced envelope to the specified coordinate reference system using the specified amount of points.

This method can handle the case where the envelope contains the North or South pole, or when it cross the ±180� longitude.

Overrides:
transform in class ReferencedEnvelope
Parameters:
targetCRS - The target coordinate reference system.
lenient - true if datum shift should be applied even if there is insuffisient information. Otherwise (if false), an exception is thrown in such case.
numPointsForTransformation - The number of points to use for sampling the envelope.
Returns:
The transformed envelope.
Throws:
FactoryException - if the math transform can't be determined.
TransformException - if at least one coordinate can't be transformed.
See Also:
CRS.transform(CoordinateOperation, org.opengis.geometry.Envelope)

hashCode

public int hashCode()
Returns a hash value for this envelope. This value need not remain consistent between different implementations of the same class.

Overrides:
hashCode in class ReferencedEnvelope

equals

public boolean equals(Object other)
Compares the specified object with this envelope for equality.

Overrides:
equals in class ReferencedEnvelope

boundsEquals3D

public boolean boundsEquals3D(Envelope other,
                              double eps)
Compare the bounds of this envelope with those of another.

Note: in this test:

Parameters:
other - other envelope
eps - a small tolerance factor (e.g. 1.0e-6d) which will be scaled relative to this envlope's width and height
Returns:
true if all bounding coordinates are equal within the set tolerance; false otherwise

include

public void include(double x,
                    double y)
Description copied from class: ReferencedEnvelope
Include the provided coordinates, expanding as necessary.

Specified by:
include in interface BoundingBox
Overrides:
include in class ReferencedEnvelope
Parameters:
x - The first ordinate value.
y - The second ordinate value.


Copyright © 1996-2014 Geotools. All Rights Reserved.