com.esri.sde.sdk.geom
Class SeGeometry

java.lang.Object
  extended by com.esri.sde.sdk.geom.SeGeometry
All Implemented Interfaces:
Geometry, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
SeCurve, SeGeometryCollection, SePoint, SeSurface

public abstract class SeGeometry
extends java.lang.Object
implements Geometry, java.lang.Cloneable, java.io.Serializable

This is the non-instantiable root class of the hierarchy, its instantiable subclasses are 0, 1 to two-dimensional geometric objects that exist in two-dimensional coordinate space.

See Also:
Serialized Form

Field Summary
static int LINESTRING_TYPE
           
static int LINESTRINGM_TYPE
           
static int LINESTRINGZ_TYPE
           
static int LINESTRINGZM_TYPE
           
static int MULTILINESTRING_TYPE
           
static int MULTILINESTRINGM_TYPE
           
static int MULTILINESTRINGZ_TYPE
           
static int MULTILINESTRINGZM_TYPE
           
static int MULTIPOINT_TYPE
           
static int MULTIPOINTM_TYPE
           
static int MULTIPOINTZ_TYPE
           
static int MULTIPOINTZM_TYPE
           
static int MULTIPOLYGON_TYPE
           
static int MULTIPOLYGONM_TYPE
           
static int MULTIPOLYGONZ_TYPE
           
static int MULTIPOLYGONZM_TYPE
           
static int POINT_TYPE
           
static int POINTM_TYPE
           
static int POINTZ_TYPE
           
static int POINTZM_TYPE
           
static int POLYGON_TYPE
           
static int POLYGONM_TYPE
           
static int POLYGONZ_TYPE
           
static int POLYGONZM_TYPE
           
static int UNSPECIFIED_TYPE
           
 
Constructor Summary
SeGeometry()
           
 
Method Summary
 java.io.ByteArrayOutputStream asBinary()
          Asbinary takes a geometry object and returns its well-known binary representation.
 java.io.ByteArrayOutputStream asBinaryShape()
          Asbinaryshape takes a geometry object and returns a BLOB.
 java.lang.String asText()
          Astext takes a geometry object and returns its well-known text representation.
abstract  Geometry boundary()
          Boundary takes a geometry object and returns its combined boundary as a geometry object.
abstract  Geometry buffer(double distance)
          Buffer takes a geometry object and returns the geometry object that surrounds the source object.
 boolean contains(Geometry g)
          Contains takes two geometry objects and returns t (TRUE) if first object completely contains the second.
abstract  Geometry convexhull()
          Returns the convex hull of a geometry object.
 boolean crosses(Geometry g)
          Crosses takes two geometry objects and returns t (TRUE) if their intersection results in a geometry object whose dimension is one less than the maximum dimension of the source objects.
 Geometry difference(Geometry g)
          Difference takes two geometry objects and returns a geometry object that is the difference of the source objects.
abstract  int dimension()
          Returns the dimension of a geometry object.
 boolean disjoint(Geometry g)
          Disjoint takes two geometries and returns t (TRUE) if the intersection of two geometries produces an empty set; otherwise it returns f (FALSE).
 double distance(Geometry g)
          Returns the closest distance separating two geometries.
abstract  Geometry envelope()
          Returns the bounding box of a geometry object as a polygon.
 boolean envelopesIntersect(Geometry g)
          Envelopesintersect returns t (TRUE) if the envelopes of two geometries intersect, otherwise it returns f (FALSE).
 boolean equal(Geometry g)
          Compares two geometries and returns t (TRUE) if the geometries are identical otherwise it returns f (FALSE).
abstract  Geometry exterior()
          The interior is the space occupied by the geometry.
abstract  java.lang.String geometryType()
          Geometrytype takes a geometry object and returns its geometry type as a string.
 double getMaxX()
           
 double getMaxY()
           
 double getMinX()
           
 double getMinY()
           
abstract  Geometry interior()
          The exterior of a geometry if all space not occupied by the geometry.
 boolean intersect(Geometry g)
          Returns t (TRUE) if the intersection of two geometries doesn't result in an empty set; otherwise, returns f (FALSE).
 Geometry[] intersection(Geometry g)
          Intersection takes two geometry objects and returns the intersection set as a geometry object.
abstract  boolean is3D()
          Returns t (TRUE) if the geometry object has three-dimensional coordinates; otherwise, returns f (FALSE).
abstract  boolean isEmpty()
          Returns t (TRUE) if the geometry is empty; otherwise returns f (FALSE).
abstract  boolean isMeasured()
          Returns t (TRUE) if the geometry object has measures; otherwise, returns f (FALSE).
abstract  boolean isSimple()
          Returns t (TRUE) if the geometry object is simple otherwise, it returns f (FALSE).
 boolean isValid()
          Returns t (TRUE) if the geometry object is valid (obeys all the Simple Features rule for its type).
 Geometry locateAlong(double measure)
          Locatealong takes a geometry object and a measure to return as a multipoint the set of points found at the measure.
 Geometry locateBetween(double measure1, double measure2)
          Locatebetween takes a geometry object and two measure locations and returns a linestring that represents the set of disconnected paths between the two measure locations.
abstract  int numPoints()
          Returns the number of points in a geometry.
 boolean overlap(Geometry g)
          Overlap takes two geometry objects and returns t (TRUE) if the intersection of the objects results in a geometry object of the same dimension but not equal to either source object, otherwise it returns f (FALSE).
 void setCoordRef(SeCoordRef cr)
           
 int srid()
          Srid takes a geometry object and returns its spatial reference system identity.
 Geometry symmetricDiff(Geometry g)
          symmetricdiff takes two geometry objects and returns a geometry object that is composed of the parts of the source objects that aren't common to both.
 com.esri.sde.sdk.sg.SgShape toSdeShape()
           
static SeGeometry toSeGeometry(com.esri.sde.sdk.sg.SgShape shape)
           
 java.lang.String toString()
           
 boolean touch(Geometry g)
          Touch returns t (TRUE) if none of the points common to both geometries intersect the interiors of both geometries; otherwise it returns f (FALSE).
 Geometry union(Geometry g)
          Union returns a geometry object that is the union of two source objects.
 boolean within(Geometry g)
          Within takes two geometry objects and returns true if the first object is completely within the second, otherwise it returns false.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNSPECIFIED_TYPE

public static final int UNSPECIFIED_TYPE
See Also:
Constant Field Values

POINT_TYPE

public static final int POINT_TYPE
See Also:
Constant Field Values

POINTM_TYPE

public static final int POINTM_TYPE
See Also:
Constant Field Values

POINTZ_TYPE

public static final int POINTZ_TYPE
See Also:
Constant Field Values

POINTZM_TYPE

public static final int POINTZM_TYPE
See Also:
Constant Field Values

MULTIPOINT_TYPE

public static final int MULTIPOINT_TYPE
See Also:
Constant Field Values

MULTIPOINTM_TYPE

public static final int MULTIPOINTM_TYPE
See Also:
Constant Field Values

MULTIPOINTZ_TYPE

public static final int MULTIPOINTZ_TYPE
See Also:
Constant Field Values

MULTIPOINTZM_TYPE

public static final int MULTIPOINTZM_TYPE
See Also:
Constant Field Values

LINESTRING_TYPE

public static final int LINESTRING_TYPE
See Also:
Constant Field Values

LINESTRINGM_TYPE

public static final int LINESTRINGM_TYPE
See Also:
Constant Field Values

LINESTRINGZ_TYPE

public static final int LINESTRINGZ_TYPE
See Also:
Constant Field Values

LINESTRINGZM_TYPE

public static final int LINESTRINGZM_TYPE
See Also:
Constant Field Values

POLYGON_TYPE

public static final int POLYGON_TYPE
See Also:
Constant Field Values

POLYGONM_TYPE

public static final int POLYGONM_TYPE
See Also:
Constant Field Values

POLYGONZ_TYPE

public static final int POLYGONZ_TYPE
See Also:
Constant Field Values

POLYGONZM_TYPE

public static final int POLYGONZM_TYPE
See Also:
Constant Field Values

MULTILINESTRING_TYPE

public static final int MULTILINESTRING_TYPE
See Also:
Constant Field Values

MULTILINESTRINGM_TYPE

public static final int MULTILINESTRINGM_TYPE
See Also:
Constant Field Values

MULTILINESTRINGZ_TYPE

public static final int MULTILINESTRINGZ_TYPE
See Also:
Constant Field Values

MULTILINESTRINGZM_TYPE

public static final int MULTILINESTRINGZM_TYPE
See Also:
Constant Field Values

MULTIPOLYGON_TYPE

public static final int MULTIPOLYGON_TYPE
See Also:
Constant Field Values

MULTIPOLYGONM_TYPE

public static final int MULTIPOLYGONM_TYPE
See Also:
Constant Field Values

MULTIPOLYGONZ_TYPE

public static final int MULTIPOLYGONZ_TYPE
See Also:
Constant Field Values

MULTIPOLYGONZM_TYPE

public static final int MULTIPOLYGONZM_TYPE
See Also:
Constant Field Values
Constructor Detail

SeGeometry

public SeGeometry()
Method Detail

interior

public abstract Geometry interior()
                           throws com.esri.sde.sdk.geom.SeGeometryException
Description copied from interface: Geometry
The exterior of a geometry if all space not occupied by the geometry.

Specified by:
interior in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

exterior

public abstract Geometry exterior()
                           throws com.esri.sde.sdk.geom.SeGeometryException
Description copied from interface: Geometry
The interior is the space occupied by the geometry.

Specified by:
exterior in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

boundary

public abstract Geometry boundary()
                           throws com.esri.sde.sdk.geom.SeGeometryException
Description copied from interface: Geometry
Boundary takes a geometry object and returns its combined boundary as a geometry object.

Specified by:
boundary in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

buffer

public abstract Geometry buffer(double distance)
                         throws com.esri.sde.sdk.geom.SeGeometryException
Buffer takes a geometry object and returns the geometry object that surrounds the source object.

Specified by:
buffer in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

isSimple

public abstract boolean isSimple()
                          throws com.esri.sde.sdk.geom.SeGeometryException
Returns t (TRUE) if the geometry object is simple otherwise, it returns f (FALSE). This function determines if the given shape is simple, according to these rules: Points are always simple. MultiPoints are simple if there are no duplicates. Linestrings are simple if they are not self-intersecting (can be closed) Multistrings are simple if eac part is simple, and part only touch at end points. Polygons are always simple. MultiPolygons are always simple.

Specified by:
isSimple in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

isEmpty

public abstract boolean isEmpty()
                         throws com.esri.sde.sdk.geom.SeGeometryException
Returns t (TRUE) if the geometry is empty; otherwise returns f (FALSE).

Specified by:
isEmpty in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

isValid

public boolean isValid()
                throws com.esri.sde.sdk.geom.SeGeometryException
Returns t (TRUE) if the geometry object is valid (obeys all the Simple Features rule for its type).

Specified by:
isValid in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

numPoints

public abstract int numPoints()
                       throws com.esri.sde.sdk.geom.SeGeometryException
Returns the number of points in a geometry.

Specified by:
numPoints in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

envelope

public abstract Geometry envelope()
                           throws com.esri.sde.sdk.geom.SeGeometryException
Returns the bounding box of a geometry object as a polygon.

Specified by:
envelope in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

dimension

public abstract int dimension()
                       throws com.esri.sde.sdk.geom.SeGeometryException
Returns the dimension of a geometry object.

Specified by:
dimension in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

is3D

public abstract boolean is3D()
                      throws com.esri.sde.sdk.geom.SeGeometryException
Returns t (TRUE) if the geometry object has three-dimensional coordinates; otherwise, returns f (FALSE).

Specified by:
is3D in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

isMeasured

public abstract boolean isMeasured()
                            throws com.esri.sde.sdk.geom.SeGeometryException
Returns t (TRUE) if the geometry object has measures; otherwise, returns f (FALSE).

Specified by:
isMeasured in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

srid

public int srid()
         throws com.esri.sde.sdk.geom.SeGeometryException
Srid takes a geometry object and returns its spatial reference system identity.

Specified by:
srid in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

geometryType

public abstract java.lang.String geometryType()
                                       throws com.esri.sde.sdk.geom.SeGeometryException
Geometrytype takes a geometry object and returns its geometry type as a string.

Specified by:
geometryType in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

asBinary

public java.io.ByteArrayOutputStream asBinary()
                                       throws com.esri.sde.sdk.geom.SeGeometryException
Asbinary takes a geometry object and returns its well-known binary representation.

Specified by:
asBinary in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

asText

public java.lang.String asText()
                        throws com.esri.sde.sdk.geom.SeGeometryException
Astext takes a geometry object and returns its well-known text representation.

Specified by:
asText in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

asBinaryShape

public java.io.ByteArrayOutputStream asBinaryShape()
                                            throws com.esri.sde.sdk.geom.SeGeometryException
Asbinaryshape takes a geometry object and returns a BLOB.

Throws:
com.esri.sde.sdk.geom.SeGeometryException

convexhull

public abstract Geometry convexhull()
                             throws com.esri.sde.sdk.geom.SeGeometryException
Returns the convex hull of a geometry object.

Specified by:
convexhull in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

locateAlong

public Geometry locateAlong(double measure)
                     throws com.esri.sde.sdk.geom.SeGeometryException
Locatealong takes a geometry object and a measure to return as a multipoint the set of points found at the measure.

Specified by:
locateAlong in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

locateBetween

public Geometry locateBetween(double measure1,
                              double measure2)
                       throws com.esri.sde.sdk.geom.SeGeometryException
Locatebetween takes a geometry object and two measure locations and returns a linestring that represents the set of disconnected paths between the two measure locations.

Specified by:
locateBetween in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

envelopesIntersect

public boolean envelopesIntersect(Geometry g)
                           throws com.esri.sde.sdk.geom.SeGeometryException
Envelopesintersect returns t (TRUE) if the envelopes of two geometries intersect, otherwise it returns f (FALSE).

Specified by:
envelopesIntersect in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

equal

public boolean equal(Geometry g)
              throws com.esri.sde.sdk.geom.SeGeometryException
Compares two geometries and returns t (TRUE) if the geometries are identical otherwise it returns f (FALSE).

Specified by:
equal in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

disjoint

public boolean disjoint(Geometry g)
                 throws com.esri.sde.sdk.geom.SeGeometryException
Disjoint takes two geometries and returns t (TRUE) if the intersection of two geometries produces an empty set; otherwise it returns f (FALSE).

Specified by:
disjoint in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

intersect

public boolean intersect(Geometry g)
                  throws com.esri.sde.sdk.geom.SeGeometryException
Returns t (TRUE) if the intersection of two geometries doesn't result in an empty set; otherwise, returns f (FALSE).

Specified by:
intersect in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

touch

public boolean touch(Geometry g)
              throws com.esri.sde.sdk.geom.SeGeometryException
Touch returns t (TRUE) if none of the points common to both geometries intersect the interiors of both geometries; otherwise it returns f (FALSE). At least one geometry must be a linestring, polygon, multilinestring, or multipolygon.

Specified by:
touch in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

overlap

public boolean overlap(Geometry g)
                throws com.esri.sde.sdk.geom.SeGeometryException
Overlap takes two geometry objects and returns t (TRUE) if the intersection of the objects results in a geometry object of the same dimension but not equal to either source object, otherwise it returns f (FALSE).

Specified by:
overlap in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

crosses

public boolean crosses(Geometry g)
                throws com.esri.sde.sdk.geom.SeGeometryException
Crosses takes two geometry objects and returns t (TRUE) if their intersection results in a geometry object whose dimension is one less than the maximum dimension of the source objects. The intersection object must contain points that are interior to both source geometries and it is not equal to either of the source objects. Otherwise it returns f (FALSE).

Specified by:
crosses in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

within

public boolean within(Geometry g)
               throws com.esri.sde.sdk.geom.SeGeometryException
Description copied from interface: Geometry
Within takes two geometry objects and returns true if the first object is completely within the second, otherwise it returns false.

Specified by:
within in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

contains

public boolean contains(Geometry g)
                 throws com.esri.sde.sdk.geom.SeGeometryException
Contains takes two geometry objects and returns t (TRUE) if first object completely contains the second. Otherwise it returns f (FALSE).

Specified by:
contains in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

distance

public double distance(Geometry g)
                throws com.esri.sde.sdk.geom.SeGeometryException
Returns the closest distance separating two geometries.

Specified by:
distance in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

intersection

public Geometry[] intersection(Geometry g)
                        throws com.esri.sde.sdk.geom.SeGeometryException
Intersection takes two geometry objects and returns the intersection set as a geometry object.

Specified by:
intersection in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

difference

public Geometry difference(Geometry g)
                    throws com.esri.sde.sdk.geom.SeGeometryException
Difference takes two geometry objects and returns a geometry object that is the difference of the source objects.

Specified by:
difference in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

union

public Geometry union(Geometry g)
               throws com.esri.sde.sdk.geom.SeGeometryException
Union returns a geometry object that is the union of two source objects.

Specified by:
union in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

symmetricDiff

public Geometry symmetricDiff(Geometry g)
                       throws com.esri.sde.sdk.geom.SeGeometryException
symmetricdiff takes two geometry objects and returns a geometry object that is composed of the parts of the source objects that aren't common to both.

Specified by:
symmetricDiff in interface Geometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

getMinX

public double getMinX()
               throws com.esri.sde.sdk.geom.SeGeometryException
Throws:
com.esri.sde.sdk.geom.SeGeometryException

getMinY

public double getMinY()
               throws com.esri.sde.sdk.geom.SeGeometryException
Throws:
com.esri.sde.sdk.geom.SeGeometryException

getMaxX

public double getMaxX()
               throws com.esri.sde.sdk.geom.SeGeometryException
Throws:
com.esri.sde.sdk.geom.SeGeometryException

getMaxY

public double getMaxY()
               throws com.esri.sde.sdk.geom.SeGeometryException
Throws:
com.esri.sde.sdk.geom.SeGeometryException

setCoordRef

public void setCoordRef(SeCoordRef cr)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toSeGeometry

public static SeGeometry toSeGeometry(com.esri.sde.sdk.sg.SgShape shape)
                               throws com.esri.sde.sdk.geom.SeGeometryException
Throws:
com.esri.sde.sdk.geom.SeGeometryException

toSdeShape

public com.esri.sde.sdk.sg.SgShape toSdeShape()
                                       throws com.esri.sde.sdk.geom.SeGeometryException
Throws:
com.esri.sde.sdk.geom.SeGeometryException