public interface Envelope extends Persistent, Cloneable
This interface is equivalent to the GM_Envelope specified in ISO 19107. A minimum bounding box or rectangle. Regardless of dimension, an Envelope can be represented without ambiguity as two direct positions (coordinate points). To encode an Envelope, it is sufficient to encode these two points. This is consistent with all of the data types in this specification, their state is represented by their publicly accessible attributes.
Modifier and Type | Method and Description |
---|---|
void |
add(Envelope envelope)
Adds a envelope to the current envelope.
|
void |
add(Geometry geometry)
Utility method to add the envelop of geometry to the current envelope.
|
void |
centerTo(Point p)
Centers the envelope to a given point
|
void |
clear() |
boolean |
contains(Envelope envelope)
Returns
true if the new envelope is contained in the current
envelope. |
Envelope |
convert(ICoordTrans trans)
Converts the envelope to other coordinate reference system
|
double |
getCenter(int dimension)
Returns the center ordinate along the specified dimension.
|
int |
getDimension()
The length of coordinate sequence (the number of entries) in this
envelope.
|
Geometry |
getGeometry()
It returns the equivalent of an envelope like a geometry.
|
double |
getLength(int dimension)
Returns the envelope length along the specified dimension.
|
Point |
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 |
getMinimum(int dimension)
Returns the minimal ordinate along the specified dimension.
|
Point |
getUpperCorner()
A coordinate position consisting of all the maximal ordinates for each
dimension for all points within the Envelope.
|
boolean |
intersects(Envelope envelope)
Returns
true if the new envelope intersects with the current
envelope. |
boolean |
intersects(Geometry geometry)
Returns
true if the geometry intersects with the current
envelope. |
boolean |
isEmpty()
Gets if the envelope is
null or not. |
void |
setLowerCorner(Point point)
Sets the coordinate position consisting of all the minimal ordinates for
each dimension for all points within the Envelope.
|
void |
setUpperCorner(Point upperCorner)
Sets the coordinate position consisting of all the maximal ordinates for
each dimension for all points within the Envelope.
|
loadFromState, saveToState
double getCenter(int dimension)
dimension.
- The dimensionEnvelopeNotInitializedException
- if the envelope is empty.int getDimension()
double getLength(int dimension)
dimension
- The dimension.EnvelopeNotInitializedException
- if the envelope is empty.Point getLowerCorner()
void setLowerCorner(Point point)
point
- The lower corner.double getMaximum(int dimension)
dimension
- The dimension.EnvelopeNotInitializedException
- if the envelope is empty.double getMinimum(int dimension)
dimension
- The dimension.EnvelopeNotInitializedException
- if the envelope is empty.Point getUpperCorner()
void setUpperCorner(Point upperCorner)
point
- The upper corner.void add(Envelope envelope)
envelope
- The envelope to add.void add(Geometry geometry)
add(geometry.getEnvelope())
envelope
- The envelope to add.Geometry getGeometry()
EnvelopeNotInitializedException
- if the envelope is empty.boolean contains(Envelope envelope)
true
if the new envelope is contained in the current
envelope.envelope
- The envelope to compare.boolean intersects(Envelope envelope)
true
if the new envelope intersects with the current
envelope.envelope
- The envelope to compare.boolean intersects(Geometry geometry)
true
if the geometry intersects with the current
envelope.geometry
- The geometry to compare.Envelope convert(ICoordTrans trans)
trans
- The CRS conversorEnvelopeNotInitializedException
- if the envelope is empty.boolean isEmpty()
null
or not. Is Empty means that the
lower and upper corner are null
.null
or not if is empty.void clear()
void centerTo(Point p)
p
- Point to be centered