public abstract class DefaultEnvelope extends java.lang.Object implements Envelope, Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isEmpty |
protected static java.lang.String |
LOWERCORNER_FIELD |
protected static GeometryManager |
manager |
protected Point |
max |
protected Point |
min |
static java.lang.String |
PERSISTENCE_DEFINITION_NAME |
protected IProjection |
projection |
protected static java.lang.String |
UPPERCORNER_FIELD |
| Constructor and Description |
|---|
DefaultEnvelope() |
DefaultEnvelope(IProjection projection) |
DefaultEnvelope(Point min,
Point max,
IProjection projection) |
| 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() |
java.lang.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(java.lang.Object other) |
Geometry |
getBox2D() |
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.
|
IProjection |
getProjection() |
Point |
getUpperCorner()
A coordinate position consisting of all the maximal ordinates for each
dimension for all points within the Envelope.
|
boolean |
hasM() |
boolean |
hasZ() |
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 |
isCollapsed() |
boolean |
isCollapsed(int subtype) |
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 |
setProjection(IProjection projection) |
void |
setProjectionIffNull(IProjection projection) |
void |
setUpperCorner(Point upperCorner)
Sets the coordinate position consisting of all the maximal ordinates for
each dimension for all points within the Envelope.
|
java.lang.String |
toString() |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, convert, getDimensioncloneQuietly, cloneQuietlypublic static final java.lang.String PERSISTENCE_DEFINITION_NAME
protected static final java.lang.String LOWERCORNER_FIELD
protected static final java.lang.String UPPERCORNER_FIELD
protected Point min
protected Point max
protected boolean isEmpty
protected IProjection projection
protected static GeometryManager manager
public DefaultEnvelope()
public DefaultEnvelope(IProjection projection)
public DefaultEnvelope(Point min, Point max, IProjection projection)
public java.lang.String toString()
toString in class java.lang.Objectpublic 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 boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic void setLowerCorner(Point lowerCorner)
EnvelopesetLowerCorner in interface EnvelopelowerCorner - The lower corner.public void setUpperCorner(Point upperCorner)
EnvelopesetUpperCorner in interface EnvelopeupperCorner - The upper corner.public static void registerPersistent()
public void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentPersistenceExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentPersistenceExceptionpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Cloneableclone in class java.lang.Objectjava.lang.CloneNotSupportedException - 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.public void centerTo(Point p)
Envelopepublic IProjection getProjection()
getProjection in interface Envelopepublic void setProjectionIffNull(IProjection projection)
setProjectionIffNull in interface Envelopepublic void setProjection(IProjection projection)
setProjection in interface Envelopepublic boolean isCollapsed()
isCollapsed in interface Envelopepublic boolean isCollapsed(int subtype)
isCollapsed in interface Envelope