com.esri.core.geometry
Class Geometry

java.lang.Object
  extended by com.esri.core.geometry.Geometry
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Envelope, MultiPath, MultiPoint, Point, Segment

public abstract class Geometry
extends Object
implements Serializable

A Base class for all Geometry objects. One can add or remove attributes of the Geometry and query envelope.

See Also:
Serialized Form

Nested Class Summary
static class Geometry.Type
          Geometry types
 
Field Summary
protected  VertexDescription m_description
           
 
Method Summary
protected  Object _getImpl()
           
 void addID()
          Adds the ID attribute to this Geometry
 void addM()
          Adds the M attribute to this Geometry
 void addZ()
          Adds the Z attribute to this Geometry
 double calculateArea2D()
          Calculates area of the Geometry.
 double calculateLength2D()
          Calculates length of the Geometry.
abstract  void copyTo(Geometry dst)
          Copies this geometry to another Geometry of the same type.
abstract  Geometry createInstance()
          Creates instance of empty Geometry with the same VertexDescription.
abstract  int getDimension()
          Returns the Geometry Dimension.
abstract  Geometry.Type getType()
          Returns the Geometry type.
 boolean hasID()
          Returns true if this Geometry has an ID attribute
 boolean hasM()
          Returns true if this Geometry has an M attribute
 boolean hasZ()
          Returns true if this Geometry has the Z attribute
abstract  boolean isEmpty()
          Returns True if the Geometry is empty.
static boolean isSegment(Geometry.Type type)
           
 void queryEnvelope(Envelope env)
          Returns tight bbox of the Geometry in X, Y plane, ignoring Z coordinate.
abstract  void setEmpty()
          Sets the Geometry as empty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_description

protected VertexDescription m_description
Method Detail

getType

public abstract Geometry.Type getType()
Returns the Geometry type.


getDimension

public abstract int getDimension()
Returns the Geometry Dimension. (0 for Point and MultiPoint, 1 for curves, 2 for objects that have area, 3 for objects with volume)


queryEnvelope

public void queryEnvelope(Envelope env)
Returns tight bbox of the Geometry in X, Y plane, ignoring Z coordinate.


isEmpty

public abstract boolean isEmpty()
Returns True if the Geometry is empty.


setEmpty

public abstract void setEmpty()
Sets the Geometry as empty.


createInstance

public abstract Geometry createInstance()
Creates instance of empty Geometry with the same VertexDescription.


copyTo

public abstract void copyTo(Geometry dst)
Copies this geometry to another Geometry of the same type. The result Geometry is exact copy.

Throws:
Throws - invalid_argument if the Geometry is of different type.

calculateArea2D

public double calculateArea2D()
Calculates area of the Geometry.


calculateLength2D

public double calculateLength2D()
Calculates length of the Geometry.


_getImpl

protected Object _getImpl()

addZ

public void addZ()
Adds the Z attribute to this Geometry


hasZ

public boolean hasZ()
Returns true if this Geometry has the Z attribute

Returns:
true if this Geometry has the Z attribute

addM

public void addM()
Adds the M attribute to this Geometry


hasM

public boolean hasM()
Returns true if this Geometry has an M attribute

Returns:
true if this Geometry has an M attribute

addID

public void addID()
Adds the ID attribute to this Geometry


hasID

public boolean hasID()
Returns true if this Geometry has an ID attribute

Returns:
true if this Geometry has an ID attribute

isSegment

public static boolean isSegment(Geometry.Type type)


Copyright © 2010. All Rights Reserved.