|
Spatial DataBlade JAVA API v8.21 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.spatial.geom.Envelope
public abstract class Envelope
The Envelope
class describes the extent of a shape
defined by a minimum (minX, minY, minZ, minM), and a maximum
(maxX, maxY, maxZ, maxM). The Z and M coordinates are optional.
This class is only the abstract superclass for all objects that store an Envelope. The actual storage representation is left to the subclass.
Nested Class Summary | |
---|---|
static class |
Envelope.Double
The Double class defines a shape envelope specified in
double coordinates. |
static class |
Envelope.Long
The Long class defines an envelope specified in
long coordinates. |
Method Summary | |
---|---|
void |
add(CoordPoint point)
Extends this envelope object to contain the point passed as argument. |
void |
add(double[] xy,
int off,
int len)
Adds an array of points represented by sequential xy coordinates to this Envelope . |
void |
add(double x,
double y)
Adds a point, specified by the double precision arguments x and y , to this
Envelope . |
void |
add(Envelope e)
Extends this envelope object to contain the envelope passed as argument. |
void |
addM(double m)
Adds a measure, specified by the double precision argument m to this Envelope . |
void |
addM(double[] m,
int off,
int len)
Adds an array of m coordinates (measures) to this Envelope . |
void |
addZ(double z)
Adds a z coordinate, specified by the double precision argument z to this Envelope . |
void |
addZ(double[] z,
int off,
int len)
Adds an array of z coordinates to this Envelope . |
java.lang.Object |
clone()
Return a copy of this object. |
abstract Envelope |
createIntersection(Envelope e)
Returns a new Envelope object representing the
intersection of this Envelope with the specified
Envelope . |
abstract Envelope |
createUnion(Envelope e)
Returns a new Envelope object representing the union of
this Envelope with the specified Envelope . |
boolean |
equals(java.lang.Object obj)
Determines whether or not the specified Object is
equal to this Envelope . |
CoordPoint |
getCenter()
Returns a point containing the coordinates of the center of this object. |
void |
getCenter(CoordPoint point)
Returns the coordinates of the center of this object in the point passed as argument. |
double |
getMax(int n)
Returns the maximum n -th coordinate of this
Envelope in double precision, where n=0 corresponds
to x, n=1 to y, n=2 to z, and n=3 to m. |
abstract double |
getMaxM()
Returns the maximum Y coordinate of this Envelope
in double precision. |
abstract double |
getMaxX()
Returns the maximum X coordinate of this Envelope
in double precision. |
abstract double |
getMaxY()
Returns the maximum Y coordinate of this Envelope
in double precision. |
abstract double |
getMaxZ()
Returns the maximum Z coordinate of this Envelope
in double precision. |
double |
getMin(int n)
Returns the minimum n -th coordinate of this
Envelope in double precision, where n=0 corresponds
to x, n=1 to y, n=2 to z, and n=3 to m. |
abstract double |
getMinM()
Returns the minimum measure of this Envelope
in double precision. |
abstract double |
getMinX()
Returns the minimum X coordinate of this Envelope
in double precision. |
abstract double |
getMinY()
Returns the minimum Y coordinate of this Envelope
in double precision. |
abstract double |
getMinZ()
Returns the minimum Z coordinate of this Envelope
in double precision. |
int |
hashCode()
Returns the hashcode for this Envelope . |
abstract boolean |
hasM()
Determines whether or not this Envelope has a M (measure) extent. |
abstract boolean |
hasZ()
Determines whether or not this Envelope has a Z extent. |
static void |
intersect(Envelope src1,
Envelope src2,
Envelope dest)
Intersects the pair of specified source Envelope
objects and puts the result into the specified destination
Envelope object. |
boolean |
intersects(Envelope e)
Determines whether this Envelope intersects the argument |
abstract boolean |
isEmpty()
Tests whether this Envelope is empty (no extent). |
abstract void |
setEmpty()
Sets this Envelope to empty (no extent). |
abstract void |
setExtent(double minX,
double minY,
double maxX,
double maxY)
Sets the extent of this Envelope to the specified values. |
void |
setExtent(Envelope e)
Sets this Envelope to be the same as the
specified Envelope . |
abstract void |
setExtentM(double minM,
double maxM)
Sets the extent of the M coordinate of this Envelope to the
specified values. |
abstract void |
setExtentZ(double minZ,
double maxZ)
Sets the extent of the Z coordinate of this Envelope to the
specified values. |
static void |
union(Envelope src1,
Envelope src2,
Envelope dest)
Unions the pair of source Envelope objects and puts the
result into the specified destination Envelope object. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public abstract double getMinX()
Envelope
in double precision.
Envelope
.public abstract double getMaxX()
Envelope
in double precision.
Envelope
.public abstract double getMinY()
Envelope
in double precision.
Envelope
.public abstract double getMaxY()
Envelope
in double precision.
Envelope
.public abstract double getMinZ()
Envelope
in double precision.
Envelope
.public abstract double getMaxZ()
Envelope
in double precision.
Envelope
.public abstract double getMinM()
Envelope
in double precision.
Envelope
.public abstract double getMaxM()
Envelope
in double precision.
Envelope
.public double getMin(int n)
n
-th coordinate of this
Envelope
in double precision, where n=0 corresponds
to x, n=1 to y, n=2 to z, and n=3 to m.
n
- the coordinate index
n
-th coordinate of this
Envelope
.public double getMax(int n)
n
-th coordinate of this
Envelope
in double precision, where n=0 corresponds
to x, n=1 to y, n=2 to z, and n=3 to m.
n
- the coordinate index
n
-th coordinate of this
Envelope
.public void getCenter(CoordPoint point)
point
- the point to be filled in with the coordinates
of this object's center.public CoordPoint getCenter()
public abstract boolean isEmpty()
public abstract void setEmpty()
public abstract boolean hasZ()
public abstract boolean hasM()
public abstract void setExtent(double minX, double minY, double maxX, double maxY)
Envelope
to the specified values.
minX, maxX
- the minimum/maximum x coordinate valuesminY, maxY
- the minimum/maximum y coordinate valuespublic abstract void setExtentZ(double minZ, double maxZ)
Envelope
to the
specified values.
minZ, maxZ
- the minimum/maximum Z coordinate valuespublic abstract void setExtentM(double minM, double maxM)
Envelope
to the
specified values.
minM, maxM
- the minimum/maximum M coordinate valuespublic void setExtent(Envelope e)
Envelope
to be the same as the
specified Envelope
.
e
- the specified Envelope
public abstract Envelope createIntersection(Envelope e)
Envelope
object representing the
intersection of this Envelope
with the specified
Envelope
.
e
- the Envelope
that is intersected with this
Envelope
Envelope
contained in both the
specified Envelope
and in this Envelope
.public static void intersect(Envelope src1, Envelope src2, Envelope dest)
Envelope
objects and puts the result into the specified destination
Envelope
object.
src1
- the first of a pair of Envelope
objects to be intersected with each othersrc2
- the second of a pair of Envelope
objects to be intersected with each otherdest
- the Envelope
that holds the
results of the intersection of src1
and
src2
public boolean intersects(Envelope e)
Envelope
intersects the argument
true
if this Envelope
intersects the argument; false
otherwise.public abstract Envelope createUnion(Envelope e)
Envelope
object representing the union of
this Envelope
with the specified Envelope
.
r
- the Envelope
to be combined with
this Envelope
Envelope
containing
both the specified Envelope
and this
Envelope
.public static void union(Envelope src1, Envelope src2, Envelope dest)
Envelope
objects and puts the
result into the specified destination Envelope
object.
src1
- the first of a pair of Envelope
objects to
be combined with each othersrc2
- the second of a pair of Envelope
objects to be combined with each otherdest
- the Envelope
that holds the results of the
union of src1
and src2
public void add(double x, double y)
x
and y
, to this
Envelope
. The resulting Envelope
is the smallest Envelope
that contains both the original
Envelope
and the specified point.
x, y
- the coordinates of the new pointpublic void add(double[] xy, int off, int len)
Envelope
. The resulting Envelope
is the smallest Envelope
that contains both the original
Envelope
and the specified array of points.
xy
- array of points in the format {xy}*off
- offset of the first coordinate pair to be used (the
position in the array of the first coordinate to be
used is 2 * off)len
- the number of coordinate pairs to be used
for the calculation
java.lang.IndexOutOfBoundsException
- if off and len lead to positions
out of the xy array boundspublic void addZ(double z)
z
to this Envelope
. The resulting
Envelope
is the smallest Envelope
that
contains both the original Envelope
and the specified
coordinate.
z
- the new z coordinatepublic void addZ(double[] z, int off, int len)
Envelope
. The resulting Envelope
is the smallest Envelope
that contains both the original
Envelope
and the specified array of z coordinates.
z
- array of z coordinatesoff
- offset of the first coordinate to be usedlen
- the number of coordinates to be used for the calculation
java.lang.IndexOutOfBoundsException
- if off and len lead to positions
out of the z array boundspublic void addM(double m)
m
to this Envelope
. The resulting
Envelope
is the smallest Envelope
that
contains both the original Envelope
and the specified
value.
m
- the new measure valuepublic void addM(double[] m, int off, int len)
Envelope
. The resulting Envelope
is the smallest Envelope
that contains both the original
Envelope
and the specified array of m coordinates.
m
- array of m coordinatesoff
- offset of the first coordinate to be usedlen
- the number of coordinates to be used for the calculation
java.lang.IndexOutOfBoundsException
- if off and len lead to positions
out of the m array boundspublic void add(CoordPoint point)
point
- the point to add to this objectpublic void add(Envelope e)
e
- the envelope to add to this objectpublic int hashCode()
Envelope
.
hashCode
in class java.lang.Object
Envelope
.public boolean equals(java.lang.Object obj)
Object
is
equal to this Envelope
. The specified
Object
is equal to this Envelope
if it is an instance of Envelope
and if its
location and size are the same as this Envelope
.
equals
in class java.lang.Object
obj
- an Object
to be compared with this
Envelope
.
true
if obj
is an instance
of Envelope
and has the same values;
false
otherwise.public java.lang.Object clone()
clone
in class java.lang.Object
|
Spatial DataBlade JAVA API v8.21 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |