public abstract class DefaultEnvelope extends Object implements Envelope, Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isEmpty |
protected static String |
LOWERCORNER_FIELD |
protected static GeometryManager |
manager |
protected Point |
max |
protected Point |
min |
static String |
PERSISTENCE_DEFINITION_NAME |
protected static String |
UPPERCORNER_FIELD |
| Constructor and Description |
|---|
DefaultEnvelope() |
DefaultEnvelope(Point min,
Point max) |
| Modifier and Type | Method and Description |
|---|---|
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() |
Object |
clone()
Creates a copy of the object.
|
boolean |
contains(Envelope envelope)
Returns
true if the new envelope is contained in the current
envelope. |
boolean |
equals(Object other) |
double |
getCenter(int dimension)
Returns the center ordinate along the specified dimension.
|
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 |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
static void |
registerPersistent() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setLowerCorner(Point lowerCorner)
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.
|
String |
toString() |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, convert, getDimensionpublic static final String PERSISTENCE_DEFINITION_NAME
protected static final String LOWERCORNER_FIELD
protected static final String UPPERCORNER_FIELD
protected Point min
protected Point max
protected boolean isEmpty
protected static GeometryManager manager
public double getCenter(int dimension)
public double getLength(int dimension)
public Point getLowerCorner()
getLowerCorner in interface Envelopepublic double getMaximum(int dimension)
getMaximum in interface Envelopedimension - public double getMinimum(int dimension)
getMinimum in interface Envelopedimension - public Point getUpperCorner()
getUpperCorner in interface Envelopepublic Geometry getGeometry()
EnvelopegetGeometry in interface Envelopepublic boolean contains(Envelope envelope)
Envelopetrue if the new envelope is contained in the current
envelope.public boolean intersects(Envelope envelope)
Envelopetrue if the new envelope intersects with the current
envelope.intersects in interface Envelopeenvelope - The envelope to compare.public void setLowerCorner(Point lowerCorner)
EnvelopesetLowerCorner in interface EnvelopelowerCorner - The lower corner.public void setUpperCorner(Point upperCorner)
EnvelopesetUpperCorner in interface Envelopepublic static void registerPersistent()
public void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentPersistenceExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentPersistenceExceptionpublic Object clone() throws CloneNotSupportedException
Cloneableclone in class ObjectCloneNotSupportedException - if the instance of the object cannot
be cloned. As this is extending Cloneable so
its sure it implements it, so this exception may be used for problems
on specific object instances.Object#clone()}.public boolean isEmpty()
Envelopenull or not. Is Empty means that the
lower and upper corner are null.public void add(Geometry geometry)
Envelopeadd(geometry.getEnvelope())public boolean intersects(Geometry geometry)
Envelopetrue if the geometry intersects with the current
envelope.intersects in interface Envelopegeometry - The geometry to compare.