|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.esri.core.geometry.Geometry
com.esri.core.geometry.Envelope
public final class Envelope
A class that represents an Envelope or Extent
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.esri.core.geometry.Geometry |
|---|
Geometry.Type |
| Field Summary |
|---|
| Fields inherited from class com.esri.core.geometry.Geometry |
|---|
m_description |
| Constructor Summary | |
|---|---|
Envelope()
Constructs an empty 2D Envelope |
|
Envelope(double xmin,
double ymin,
double xmax,
double ymax)
Constructs a 2D Envelope with the specified x and y extents. |
|
Envelope(com.esri.core.geometry.Envelope2D env2D)
|
|
Envelope(Point point)
Constructs an Envelope that covers the given point. |
|
Envelope(Point center,
double w,
double h)
|
|
| Method Summary | |
|---|---|
double |
calculateArea2D()
Returns the area of this 2D envelope |
double |
calculateLength2D()
Returns the perimeter of this 2D envelope |
void |
centerAt(Point c)
Centers this 2D Envelope around the specified 2D point |
void |
centerAt(Point c,
double w,
double h)
Sets this 2D envelope's corners to be centered around the specified center Point, and it's width and height to be the ones specified |
boolean |
contains(Point p)
Returns if this 2D envelope contains (covers) the specified 2D point |
Envelope |
copy()
Returns a copy of this envelope |
void |
copyTo(Geometry dst)
Copies this geometry to another Geometry of the same type. |
Geometry |
createInstance()
Creates instance of empty Geometry with the same VertexDescription. |
boolean |
equals(Object _other)
|
Point |
getCenter()
Gets the center point of this 2D envelope. |
double |
getCenterX()
Returns the envelope center's X coordinate |
double |
getCenterY()
Returns the envelope center's Y coordinate |
int |
getDimension()
Returns the Geometry Dimension. |
double |
getHeight()
Returns the envelope's height |
Point |
getLowerLeft()
Returns this 2D envelope's lower left corner point |
Point |
getLowerRight()
Returns this 2D envelope's lower right corner point |
Geometry.Type |
getType()
Returns the Geometry type. |
Point |
getUpperLeft()
Returns this 2D envelope's upper left corner point |
Point |
getUpperRight()
Returns this 2D envelope's lower left corner point |
double |
getWidth()
Returns the envelope's width |
double |
getXMax()
Returns the right corner's x coordinate |
double |
getXMin()
Returns the left corner's x coordinate |
double |
getYMax()
Returns the top corner's y coordinate |
double |
getYMin()
Returns the bottom corner's y coordinate |
int |
hashCode()
|
boolean |
intersect(Envelope other)
Returns true if the specified 2D envelope intersects with this 2D envelope |
boolean |
isEmpty()
Returns if this Envelope is empty |
void |
merge(Envelope other)
|
void |
normalize()
Fixes "broken" 2D envelope, that has min dimension larger than the max one. |
void |
offset(double dx,
double dy)
Offsets 2D envelope by the specified distances along x and y coordinates. |
void |
queryCoornerByVal(int index,
Point ptDst)
Sets the specified points coordinates to those of this envelope's corners |
void |
queryEnvelope(Envelope env)
Sets the specified envelope's 2D (x and y) coordinates to the same values as those of this envelope |
void |
reaspect(double arWidth,
double arHeight)
Reaspects a 2D envelope to fit within the specified width and height |
void |
setCoords(double xmin,
double ymin,
double xmax,
double ymax)
Sets the 2 dimensional extents of this envelope |
void |
setEmpty()
Sets this envelope to be an empty envelope |
void |
setXMax(double x)
Sets the right x coordinate |
void |
setXMin(double x)
Sets the left x coordinate |
void |
setYMax(double y)
Sets the top y coordinate |
void |
setYMin(double y)
Sets the bottom y coordinate |
| Methods inherited from class com.esri.core.geometry.Geometry |
|---|
_getImpl, addID, addM, addZ, hasID, hasM, hasZ, isSegment |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Envelope(Point center,
double w,
double h)
public Envelope(com.esri.core.geometry.Envelope2D env2D)
public Envelope()
public Envelope(Point point)
point - - the Point that the envelope covers
public Envelope(double xmin,
double ymin,
double xmax,
double ymax)
xmin - - the minimum X coordinate of the Envelopeymin - - the minimum Y coordinate of the Envelopexmax - - the maximum X coordinate of the Envelopeymax - - the maximum Y coordinate of the Envelope| Method Detail |
|---|
public void setCoords(double xmin,
double ymin,
double xmax,
double ymax)
xmin - - the minimum X coordinate of the Envelopeymin - - the minimum Y coordinate of the Envelopexmax - - the maximum X coordinate of the Envelopeymax - - the maximum Y coordinate of the Envelopepublic void setEmpty()
setEmpty in class Geometrypublic boolean isEmpty()
isEmpty in class Geometrypublic double getWidth()
public double getHeight()
public double getCenterX()
public double getCenterY()
public void merge(Envelope other)
public void reaspect(double arWidth,
double arHeight)
arWidth - - the width within which to fit the envelopearHeight - - the height within which to fit the envelopepublic void copyTo(Geometry dst)
Geometry
copyTo in class Geometrypublic Geometry createInstance()
Geometry
createInstance in class Geometrypublic double calculateArea2D()
calculateArea2D in class Geometrypublic double calculateLength2D()
calculateLength2D in class Geometrypublic Geometry.Type getType()
Geometry
getType in class Geometrypublic int getDimension()
Geometry
getDimension in class Geometrypublic void queryEnvelope(Envelope env)
queryEnvelope in class Geometryenv - - the envelope whose X and Y coordinates are to be set
public void queryCoornerByVal(int index,
Point ptDst)
index - - 0 for lower left, 1 for top-left, 2 for top right, 3 for bottom rightptDst - - the Point whose coordinates are to be set to those of this Envelope's specified cornerpublic Envelope copy()
public boolean intersect(Envelope other)
other - - the 2D envelope to test intersection with
public void centerAt(Point c,
double w,
double h)
c - - the 2D Point around which to center this Envelopew - - the width to be set for this Envelopeh - - the height to be set for this Envelope
public void offset(double dx,
double dy)
dx - - the x offset to be applieddy - - the y offset to be appliedpublic void normalize()
public Point getCenter()
public void centerAt(Point c)
c - - the new center Pointpublic Point getLowerLeft()
public Point getUpperRight()
public Point getLowerRight()
public Point getUpperLeft()
public boolean contains(Point p)
p - - the 2D Point to be tested for coverage
public boolean equals(Object _other)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic double getXMin()
public double getYMin()
public double getXMax()
public double getYMax()
public void setXMin(double x)
x - public void setXMax(double x)
x - public void setYMin(double y)
y - public void setYMax(double y)
y -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||