public abstract class

Geometry

extends Object
implements Serializable
java.lang.Object
   ↳ com.esri.core.geometry.Geometry
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Common properties and methods shared by all geometric objects. Geometries are objects that define a spatial location and and associated geometric shape.

Summary

Nested Classes
enum Geometry.Type The type of this geometry. 
Fields
protected VertexDescription m_description an object which describes the vertex format of the Geometry.
protected int m_touchFlag a synchronized integer to track the state of the geometry.
Public Methods
abstract 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.
Geometry copy()
Creates a copy of the geometry.
abstract void copyTo(Geometry dst)
Copies this geometry to another geometry of the same type.
abstract int getDimension()
Returns the topological dimension of the geometry object based on the geometry's type.
static int getDimensionFromType(int type)
Returns an integer for this geometry's dimension.
int getStateFlag()
Returns the state of the geometry.
abstract Geometry.Type getType()
Returns the geometry type.
static boolean isArea(int type)
Indicates if the integer value of the enumeration is an area (dimension 2).
abstract boolean isEmpty()
Indicates if the geometry object contains geometric information.
static boolean isLinear(int type)
Indicates if the integer value of the enumeration is linear (dimension 1).
static boolean isMultiPath(int type)
Indicates if the integer value of the enumeration is a multipath (ie, line or area).
static boolean isMultiVertex(int type)
Indicates if the integer value of the enumeration is a multivertex (ie, multipoint, line, or area).
static boolean isPoint(int type)
Indicates if the integer value of the enumeration is a point type (dimension 0).
static boolean isSegment(int type)
Indicates if the integer value of the enumeration is a segment.
abstract void queryEnvelope(Envelope env)
Gets the axis aligned bounding box of the geometry.
abstract void setEmpty()
Sets the geometry to its original initialization state by releasing all data referenced by the geometry.
Protected Methods
Object _getImpl()
Returns implementation class of the geometry.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected VertexDescription m_description

an object which describes the vertex format of the Geometry.

protected int m_touchFlag

a synchronized integer to track the state of the geometry.

Public Methods

public abstract void applyTransformation (Transformation2D transform)

Applies 2D affine transformation in XY plane.

Parameters
transform The affine transformation to be applied to this geometry.

public double calculateArea2D ()

Calculates the area of the geometry. If the spatial reference is a Geographic Coordinate System (WGS84) then the 2D area calculation is defined in angular units.

Returns
  • A double value representing the 2D area of the geometry.

public double calculateLength2D ()

Calculates the length of the geometry. If the spatial reference is a Geographic Coordinate System (a system where coordinates are defined using angular units such as longitude and latitude) then the 2D distance calculation is returned in angular units. In cases where length must be calculated on a Geographic Coordinate System consider the using the geodeticLength method in GeometryEngine.

Returns
  • A double value representing the 2D length of the geometry.

public Geometry copy ()

Creates a copy of the geometry.

Returns
  • Returns a copy of this geometry.

public abstract void copyTo (Geometry dst)

Copies this geometry to another geometry of the same type. The result geometry is an exact copy.

Throws
GeometryException invalid_argument if the geometry is of different type.

public abstract int getDimension ()

Returns the topological dimension of the geometry object based on the geometry's type.

Returns 0 for point and multipoint.

Returns 1 for lines and polylines.

Returns 2 for polygons and envelopes

Returns 3 for objects with volume

Returns
  • Returns the integer value of the dimension of geometry.

public static int getDimensionFromType (int type)

Returns an integer for this geometry's dimension.

Returns 0 for point and multipoint.

Returns 1 for lines and polylines.

Returns 2 for polygons and envelopes

Returns 3 for objects with volume

Parameters
type The integer value from geometry enumeration. You can use the method value() to get at the integer value.
Returns
  • The integer dimension of this geometry.

public int getStateFlag ()

Returns the state of the geometry. The stateFlag value changes with changes applied to this geometry. This allows the user to keep track of the geometry's state.

Returns
  • The state of the geometry.

public abstract Geometry.Type getType ()

Returns the geometry type.

Returns
  • Returns the geometry type.

public static boolean isArea (int type)

Indicates if the integer value of the enumeration is an area (dimension 2).

Parameters
type The integer value from geometry enumeration. You can use the method value() to get at the integer value.
Returns
  • TRUE if the geometry is a polygon.

public abstract boolean isEmpty ()

Indicates if the geometry object contains geometric information. IsEmpty returns true when the geometry object does not contain geometric information beyond its original initialization state.

Returns
  • boolean Returns true if this geometry is empty.

public static boolean isLinear (int type)

Indicates if the integer value of the enumeration is linear (dimension 1).

Parameters
type The integer value from geometry enumeration. You can use the method value() to get at the integer value.
Returns
  • TRUE if the geometry is a line.

public static boolean isMultiPath (int type)

Indicates if the integer value of the enumeration is a multipath (ie, line or area).

Parameters
type The integer value from geometry enumeration. You can use the method value() to get at the integer value.
Returns
  • TRUE if the geometry is a multipath.

public static boolean isMultiVertex (int type)

Indicates if the integer value of the enumeration is a multivertex (ie, multipoint, line, or area).

Parameters
type The integer value from geometry enumeration. You can use the method value() to get at the integer value.
Returns
  • TRUE if the geometry has multiple vertices.

public static boolean isPoint (int type)

Indicates if the integer value of the enumeration is a point type (dimension 0).

Parameters
type The integer value from geometry enumeration. You can use the method value() to get at the integer value.
Returns
  • TRUE if the geometry is a point.

public static boolean isSegment (int type)

Indicates if the integer value of the enumeration is a segment.

Parameters
type The integer value from geometry enumeration. You can use the method value() to get at the integer value.
Returns
  • TRUE if the geometry is a segment.

public abstract void queryEnvelope (Envelope env)

Gets the axis aligned bounding box of the geometry.

Parameters
env The envelope to return the result in.

public abstract void setEmpty ()

Sets the geometry to its original initialization state by releasing all data referenced by the geometry.

Protected Methods

protected Object _getImpl ()

Returns implementation class of the geometry. Subclass overrides this method.