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, wait
add, convert, getDimension
public 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 Envelope
public double getMaximum(int dimension)
getMaximum
in interface Envelope
dimension
- public double getMinimum(int dimension)
getMinimum
in interface Envelope
dimension
- public Point getUpperCorner()
getUpperCorner
in interface Envelope
public Geometry getGeometry()
Envelope
getGeometry
in interface Envelope
public boolean contains(Envelope envelope)
Envelope
true
if the new envelope is contained in the current
envelope.public boolean intersects(Envelope envelope)
Envelope
true
if the new envelope intersects with the current
envelope.intersects
in interface Envelope
envelope
- The envelope to compare.public void setLowerCorner(Point lowerCorner)
Envelope
setLowerCorner
in interface Envelope
lowerCorner
- The lower corner.public void setUpperCorner(Point upperCorner)
Envelope
setUpperCorner
in interface Envelope
public static void registerPersistent()
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public Object clone() throws CloneNotSupportedException
Cloneable
clone
in class Object
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()
Envelope
null
or not. Is Empty means that the
lower and upper corner are null
.public void add(Geometry geometry)
Envelope
add(geometry.getEnvelope())
public boolean intersects(Geometry geometry)
Envelope
true
if the geometry intersects with the current
envelope.intersects
in interface Envelope
geometry
- The geometry to compare.