Esri Geoportal Server
1.0

com.esri.gpt.framework.geometry
Class Envelope

java.lang.Object
  extended by com.esri.gpt.framework.geometry.Geometry
      extended by com.esri.gpt.framework.geometry.Envelope
All Implemented Interfaces:
Serializable, Cloneable

public class Envelope
extends Geometry
implements Cloneable, Serializable

Basic envelope.

See Also:
Serialized Form

Field Summary
static double EMPTY
           
 
Constructor Summary
Envelope()
          Default constructor.
Envelope(double minX, double minY, double maxX, double maxY)
          Instantiates a new envelope.
Envelope(Envelope objectToDuplicate)
          Construct by duplicating an existing object.
 
Method Summary
 Envelope clone()
          Clones object.
 void echo(StringBuffer sb)
          Appends property information for the component to a StringBuffer.
 boolean equals(Object obj)
          Checks if two objects are equal.
 double getCenterX()
          Gets x coordinate of the center of the envelope.
 double getCenterY()
          Gets y coordinate of the center of the envelope.
 double getHeight()
          Gets the height.
 double getMaxX()
          Gets the maximum x-coordinate.
 double getMaxY()
          Gets the maximum y-coordinate.
 double getMinX()
          Gets the minimum x-coordinate.
 double getMinY()
          Gets the minimum y-coordinate.
 double getWidth()
          Gets the width.
 boolean hasSize()
          Determines if a the envelope has size.
 boolean isEmpty()
          Determines the empty staus.
 boolean isValid()
          Determines if the envelope is valid.
 void merge(Envelope envelope)
          Merges this envelope with the argument envelope.
 void put(double minx, double miny, double maxx, double maxy)
          Puts coordinate values.
 void put(String minx, String miny, String maxx, String maxy)
          Puts coordinate values.
 void setMaxX(double d)
          Sets the maximum x-coordinate.
 void setMaxX(String s)
          Sets the maximum x-coordinate (string entry).
 void setMaxY(double d)
          Sets the maximum y-coordinate.
 void setMaxY(String s)
          Sets the maximum y-coordinate (string entry).
 void setMinX(double d)
          Sets the minimum x-coordinate.
 void setMinX(String s)
          Sets the minimum x-coordinate (string entry).
 void setMinY(double d)
          Sets the minimum y-coordinate.
 void setMinY(String s)
          Sets the minimum y-coordinate (string entry).
 String toString()
          Returns the string representation of the object.
 
Methods inherited from class com.esri.gpt.framework.geometry.Geometry
getWkid, setWkid
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final double EMPTY
See Also:
Constant Field Values
Constructor Detail

Envelope

public Envelope()
Default constructor.


Envelope

public Envelope(double minX,
                double minY,
                double maxX,
                double maxY)
Instantiates a new envelope.

Parameters:
minX - the minimum x
minY - the minimum y
maxX - the maximum x
maxY - the maximum y

Envelope

public Envelope(Envelope objectToDuplicate)
Construct by duplicating an existing object.

Parameters:
objectToDuplicate - the object to duplicate
Method Detail

getHeight

public double getHeight()
Gets the height.

Returns:
the height

getMaxX

public double getMaxX()
Gets the maximum x-coordinate.

Returns:
the maximum x-coordinate

setMaxX

public void setMaxX(double d)
Sets the maximum x-coordinate.

Parameters:
d - the maximum x-coordinate

setMaxX

public void setMaxX(String s)
Sets the maximum x-coordinate (string entry).

Parameters:
s - the maximum x-coordinate

getMaxY

public double getMaxY()
Gets the maximum y-coordinate.

Returns:
the maximum y-coordinate

setMaxY

public void setMaxY(double d)
Sets the maximum y-coordinate.

Parameters:
d - the maximum y-coordinate

setMaxY

public void setMaxY(String s)
Sets the maximum y-coordinate (string entry).

Parameters:
s - the maximum y-coordinate

getMinX

public double getMinX()
Gets the minimum x-coordinate.

Returns:
the minimum x-coordinate

setMinX

public void setMinX(double d)
Sets the minimum x-coordinate.

Parameters:
d - the minimum x-coordinate

setMinX

public void setMinX(String s)
Sets the minimum x-coordinate (string entry).

Parameters:
s - the minimum x-coordinate

getMinY

public double getMinY()
Gets the minimum y-coordinate.

Returns:
the minimum y-coordinate

setMinY

public void setMinY(double d)
Sets the minimum y-coordinate.

Parameters:
d - the minimum y-coordinate

setMinY

public void setMinY(String s)
Sets the minimum y-coordinate (string entry).

Parameters:
s - the minimum y-coordinate

getWidth

public double getWidth()
Gets the width.

Returns:
the width

getCenterX

public double getCenterX()
Gets x coordinate of the center of the envelope.

Returns:
x coordinate of the center of the envelope

getCenterY

public double getCenterY()
Gets y coordinate of the center of the envelope.

Returns:
y coordinate of the center of the envelope

echo

public void echo(StringBuffer sb)
Appends property information for the component to a StringBuffer.
The method is intended to support "FINEST" logging.
super.echo should be invoked prior appending any local information.

Overrides:
echo in class Geometry
Parameters:
sb - the StringBuffer to use when appending information

toString

public String toString()
Description copied from class: Geometry
Returns the string representation of the object.

Overrides:
toString in class Geometry
Returns:
the string

hasSize

public boolean hasSize()
Determines if a the envelope has size. The envelope has size if it is not empty and both width and height are greater than zero.

Returns:
true if the envelope has size

isEmpty

public boolean isEmpty()
Determines the empty staus.
If one coordinate is empty, the envelope is empty.

Returns:
the empty status.

isValid

public boolean isValid()
Determines if the envelope is valid.
At v10, logic was switched to !isEmpty()

Returns:
true if the envelope is valid

put

public void put(double minx,
                double miny,
                double maxx,
                double maxy)
Puts coordinate values.

Parameters:
minx - minimum x-coordinate
miny - minimum y-coordinate
maxx - maximum x-coordinate
maxy - maximum y-coordinate

put

public void put(String minx,
                String miny,
                String maxx,
                String maxy)
Puts coordinate values.

Parameters:
minx - minimum x-coordinate
miny - minimum y-coordinate
maxx - maximum x-coordinate
maxy - maximum y-coordinate

clone

public Envelope clone()
Clones object.

Overrides:
clone in class Object
Returns:
itself
See Also:
Object.clone()

equals

public boolean equals(Object obj)
Checks if two objects are equal.

Overrides:
equals in class Object
Parameters:
obj - Object to be tested
Returns:
true if two objects are equal

merge

public void merge(Envelope envelope)
Merges this envelope with the argument envelope.

Parameters:
envelope - the envelope to merge with

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.