|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.core.geometry.Geometry com.esri.core.geometry.Envelope
public final class Envelope
Envelopes are the rectangular window that contain a specific element.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.esri.core.geometry.Geometry |
---|
Geometry.Type |
Constructor Summary | |
---|---|
Envelope()
Constructs an empty envelope. |
|
Envelope(double xmin,
double ymin,
double xmax,
double ymax)
Constructs an envelope with the specified X and Y extents. |
|
Envelope(Point point)
Constructs an envelope that covers the given point. |
|
Envelope(Point center,
double width,
double height)
Creates an envelope by defining its center, width, and height. |
Method Summary | |
---|---|
void |
applyTransformation(Transformation2D transform)
Applies 2D affine transformation in XY plane. |
double |
calculateArea2D()
Calculates the area of the geometry. |
double |
calculateLength2D()
Calculates the length of the geometry. |
void |
centerAt(Point c)
Centers the envelope around the specified point preserving the envelope's width and height. |
void |
centerAt(Point c,
double w,
double h)
Sets the envelope's corners to be centered around the specified point, using it's center, width, and height. |
boolean |
contains(Envelope env)
Checks if this envelope contains (covers) other envelope. |
boolean |
contains(Point p)
Checks if this envelope contains (covers) the specified point. |
void |
copyTo(Geometry dst)
Copies this geometry to another geometry of the same type. |
Geometry |
createInstance()
Creates an instance of an empty geometry of the same type. |
boolean |
equals(Object _other)
Returns TRUE when this geometry has exactly same type, properties, and coordinates as the other geometry. |
Point |
getCenter()
Returns the center point of the envelope. |
double |
getCenterX()
The X coordinate of center of the envelope. |
double |
getCenterY()
The Y coordinate fo the center of the envelope. |
int |
getDimension()
Returns the topological dimension of the geometry object based on the geometry's type. |
double |
getHeight()
The height of the envelope. |
Point |
getLowerLeft()
Returns the envelope's lower left corner point. |
Point |
getLowerRight()
Returns the envelope's lower right corner point. |
Geometry.Type |
getType()
Returns the geometry type. |
Point |
getUpperLeft()
Returns the envelope's upper left corner point. |
Point |
getUpperRight()
Returns the envelope's upper right corner point. |
double |
getWidth()
The width of the envelope. |
double |
getXMax()
Returns the X coordinate of the right corners of the envelope. |
double |
getXMin()
Returns the X coordinate of the left corners of the envelope. |
double |
getYMax()
Returns the Y coordinate of the top corners of the envelope. |
double |
getYMin()
Returns the Y coordinate of the bottom corners of the envelope. |
int |
hashCode()
Returns a hash code value for this envelope. |
void |
inflate(double dx,
double dy)
Changes the dimensions of the envelope, preserving the center. |
boolean |
intersect(Envelope other)
Changes this envelope to be the intersection of itself with the other envelope. |
boolean |
isEmpty()
Indicates whether this envelope contains any points. |
boolean |
isIntersecting(Envelope other)
Returns true if the envelope and the other given envelope intersect. |
void |
merge(Envelope other)
Merges this envelope with the extent of the given envelope. |
void |
merge(Point point)
Merges this envelope with the point. |
void |
normalize()
Normalizes envelopes if the minimum dimension is larger then then the maximum dimension. |
void |
offset(double dx,
double dy)
Offsets the envelope by the specified distances along x and y coordinates. |
void |
queryCornerByVal(int index,
Point ptDst)
Sets the point's coordinates to the coordinates of the envelope at the given corner. |
void |
queryEnvelope(Envelope env)
Gets the axis aligned bounding box of the geometry. |
void |
reaspect(double arWidth,
double arHeight)
Re-aspects this 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 the envelope. |
void |
setEmpty()
Removes all points from this geometry. |
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 |
---|
copy, getDimensionFromType, getStateFlag, isArea, isLinear, isMultiPath, isMultiVertex, isPoint, isSegment |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Envelope(Point center, double width, double height)
center
- The center point of the envelope.width
- The width of the envelope.height
- The height of the envelope.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 envelope.ymin
- The minimum Y coordinate of the envelope.xmax
- The maximum X coordinate of the envelope.ymax
- 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 envelope.ymin
- The minimum Y coordinate of the envelope.xmax
- The maximum X coordinate of the envelope.ymax
- The maximum Y coordinate of the envelope.public void setEmpty()
setEmpty
in class Geometry
public boolean isEmpty()
isEmpty
in class Geometry
public double getWidth()
public double getHeight()
public double getCenterX()
public double getCenterY()
public void merge(Envelope other)
other
- The envelope to merge with.public void merge(Point point)
point
- The point to be merged with.public void reaspect(double arWidth, double arHeight)
arWidth
- The width within which to fit the envelope.arHeight
- The height within which to fit the envelope.public void inflate(double dx, double dy)
dx
- The inflation along the X axis.dy
- The inflation along the Y axis.public void applyTransformation(Transformation2D transform)
Geometry
applyTransformation
in class Geometry
transform
- The affine transformation to be applied to this geometry.public void copyTo(Geometry dst)
Geometry
copyTo
in class Geometry
public Geometry createInstance()
Geometry
public double calculateArea2D()
Geometry
calculateArea2D
in class Geometry
public double calculateLength2D()
Geometry
GeometryEngine
.
calculateLength2D
in class Geometry
public Geometry.Type getType()
Geometry
getType
in class Geometry
public int getDimension()
Geometry
Returns 0 for point and multipoint.
Returns 1 for lines and polylines.
Returns 2 for polygons and envelopes
Returns 3 for objects with volume
getDimension
in class Geometry
public void queryEnvelope(Envelope env)
Geometry
queryEnvelope
in class Geometry
env
- The envelope to return the result in.public void queryCornerByVal(int index, Point ptDst)
index
- The index of the envlope's corners from 0 to 3.
0 = lower left corner
1 = top-left corner
2 = top right corner
3 = bottom right corner
ptDst
- The point whose coordinates are used to set the envelope's coordinate at a specified corner.public boolean intersect(Envelope other)
other
- The envelope to intersect with.
public boolean isIntersecting(Envelope other)
other
- The envelope to test intersection with.
public void centerAt(Point c, double w, double h)
c
- The point around which to center the envelope.w
- The width to be set for the envelope.h
- The height to be set for this envelope.public void offset(double dx, double dy)
dx
- The X offset to be applied.dy
- The Y offset to be applied.public void normalize()
public Point getCenter()
public void centerAt(Point c)
c
- The new center point.public Point getLowerLeft()
public Point getUpperRight()
public Point getLowerRight()
public Point getUpperLeft()
public boolean contains(Point p)
p
- The Point to be tested for coverage.
public boolean contains(Envelope env)
env
- The envelope to be tested for coverage.
public boolean equals(Object _other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public final double getXMin()
public final double getYMin()
public final double getXMax()
public final double getYMax()
public void setXMin(double x)
x
- The X coordinate of the left cornerpublic void setXMax(double x)
x
- The X coordinate of the right corner.public void setYMin(double y)
y
- the Y coordinate of the bottom corner.public void setYMax(double y)
y
- The Y coordinate of the top corner.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |