com.esri.sde.sdk.geom
Class SePolygon

java.lang.Object
  extended by com.esri.sde.sdk.geom.SeGeometry
      extended by com.esri.sde.sdk.geom.SeSurface
          extended by com.esri.sde.sdk.geom.SePolygon
All Implemented Interfaces:
Geometry, Polygon, Surface, java.io.Serializable, java.lang.Cloneable

public class SePolygon
extends SeSurface
implements Polygon, java.lang.Cloneable, java.io.Serializable

This class represents a planar SeSurface, defined by 1 exterior boundary and 0 or more interior boundaries. Each interior boundary defines a hole in the SePolygon.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.esri.sde.sdk.geom.SeGeometry
LINESTRING_TYPE, LINESTRINGM_TYPE, LINESTRINGZ_TYPE, LINESTRINGZM_TYPE, MULTILINESTRING_TYPE, MULTILINESTRINGM_TYPE, MULTILINESTRINGZ_TYPE, MULTILINESTRINGZM_TYPE, MULTIPOINT_TYPE, MULTIPOINTM_TYPE, MULTIPOINTZ_TYPE, MULTIPOINTZM_TYPE, MULTIPOLYGON_TYPE, MULTIPOLYGONM_TYPE, MULTIPOLYGONZ_TYPE, MULTIPOLYGONZM_TYPE, POINT_TYPE, POINTM_TYPE, POINTZ_TYPE, POINTZM_TYPE, POLYGON_TYPE, POLYGONM_TYPE, POLYGONZ_TYPE, POLYGONZM_TYPE, UNSPECIFIED_TYPE
 
Constructor Summary
SePolygon()
           
SePolygon(SeCoordRef cr, SeEnvelope env)
           
SePolygon(SeCoordRef cr, SePoint[] pts)
           
SePolygon(SeCoordRef cr, SePoint[][] pts)
           
 
Method Summary
 double area()
          Returns the area of a polygon or multipolygon.
 Geometry boundary()
          Boundary takes a geometry object and returns its combined boundary as a geometry object.
 Geometry buffer(double distance)
          Buffer takes a geometry object and returns the geometry object that surrounds the source object.
 Point centroid()
          Centroid takes a polygon or multipolygon and returns its geometric center as a point.
 Geometry convexhull()
          Returns the convex hull of a geometry object.
 int dimension()
          Returns the dimension of a geometry object.
 Geometry envelope()
          Returns the bounding box of a geometry object as a polygon.
 Geometry exterior()
          The interior is the space occupied by the geometry.
 Linestring exteriorRing()
          Returns the exterior ring of a polygon as a linestring.
 java.lang.String geometryType()
          Geometrytype takes a geometry object and returns its geometry type as a string.
 double[] getMs()
           
 SePoint[] getXYs()
           
 double[] getZs()
           
 Geometry interior()
          The exterior of a geometry if all space not occupied by the geometry.
 Linestring interiorRingN(int n)
          Returns the nth interior ring of a polygon as a linestring.
 boolean is3D()
          Returns t (TRUE) if the geometry object has three-dimensional coordinates; otherwise, returns f (FALSE).
 boolean isEmpty()
          Returns t (TRUE) if the geometry is empty; otherwise returns f (FALSE).
 boolean isMeasured()
          Returns t (TRUE) if the geometry object has measures; otherwise, returns f (FALSE).
 boolean isSimple()
          Returns t (TRUE) if the geometry object is simple otherwise, it returns f (FALSE).
 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.
 int numInteriorRings()
          Numinteriorrings takes a polygon and returns the number of its interior rings.
 int numPoints()
          Returns the number of points in a geometry.
 double perimeter()
          Returns the length of the perimeter of a surface.
 Point pointOnSurface()
          Pointonsurface takes a polygon or multipolygon and returns a point guaranteed to lie on its surface.
 java.lang.String toString()
           
 
Methods inherited from class com.esri.sde.sdk.geom.SeGeometry
asBinary, asBinaryShape, asText, contains, crosses, difference, disjoint, distance, envelopesIntersect, equal, getMaxX, getMaxY, getMinX, getMinY, intersect, intersection, isValid, overlap, setCoordRef, srid, symmetricDiff, toSdeShape, toSeGeometry, touch, union, within
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.esri.sde.sdk.geom.Geometry
asBinary, asText, contains, crosses, difference, disjoint, distance, envelopesIntersect, equal, intersect, intersection, isValid, overlap, srid, symmetricDiff, touch, union, within
 

Constructor Detail

SePolygon

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

SePolygon

public SePolygon(SeCoordRef cr,
                 SeEnvelope env)
          throws com.esri.sde.sdk.geom.SeGeometryException
Throws:
com.esri.sde.sdk.geom.SeGeometryException

SePolygon

public SePolygon(SeCoordRef cr,
                 SePoint[] pts)
          throws com.esri.sde.sdk.geom.SeGeometryException
Throws:
com.esri.sde.sdk.geom.SeGeometryException

SePolygon

public SePolygon(SeCoordRef cr,
                 SePoint[][] pts)
          throws com.esri.sde.sdk.geom.SeGeometryException
Throws:
com.esri.sde.sdk.geom.SeGeometryException
Method Detail

area

public double area()
            throws com.esri.sde.sdk.geom.SeGeometryException
Returns the area of a polygon or multipolygon.

Specified by:
area in interface Surface
Specified by:
area in class SeSurface
Throws:
com.esri.sde.sdk.geom.SeGeometryException

perimeter

public double perimeter()
Returns the length of the perimeter of a surface.

Specified by:
perimeter in interface Surface
Specified by:
perimeter in class SeSurface

exteriorRing

public Linestring exteriorRing()
                        throws com.esri.sde.sdk.geom.SeGeometryException
Returns the exterior ring of a polygon as a linestring.

Specified by:
exteriorRing in interface Polygon
Throws:
com.esri.sde.sdk.geom.SeGeometryException

numInteriorRings

public int numInteriorRings()
                     throws com.esri.sde.sdk.geom.SeGeometryException
Numinteriorrings takes a polygon and returns the number of its interior rings.

Specified by:
numInteriorRings in interface Polygon
Throws:
com.esri.sde.sdk.geom.SeGeometryException

interiorRingN

public Linestring interiorRingN(int n)
                         throws com.esri.sde.sdk.geom.SeGeometryException
Returns the nth interior ring of a polygon as a linestring. The order of the rings cannot be predefined since the rings are organized according to the rules defined by the internal geometry verification routines and not by geometric orientation.

Specified by:
interiorRingN in interface Polygon
Throws:
com.esri.sde.sdk.geom.SeGeometryException

centroid

public Point centroid()
               throws com.esri.sde.sdk.geom.SeGeometryException
Centroid takes a polygon or multipolygon and returns its geometric center as a point.

Specified by:
centroid in interface Surface
Specified by:
centroid in class SeSurface
Throws:
com.esri.sde.sdk.geom.SeGeometryException

pointOnSurface

public Point pointOnSurface()
                     throws com.esri.sde.sdk.geom.SeGeometryException
Pointonsurface takes a polygon or multipolygon and returns a point guaranteed to lie on its surface.

Specified by:
pointOnSurface in interface Surface
Specified by:
pointOnSurface in class SeSurface
Throws:
com.esri.sde.sdk.geom.SeGeometryException

interior

public Geometry interior()
The exterior of a geometry if all space not occupied by the geometry.

Specified by:
interior in interface Geometry
Specified by:
interior in class SeGeometry

exterior

public Geometry exterior()
The interior is the space occupied by the geometry.

Specified by:
exterior in interface Geometry
Specified by:
exterior in class SeGeometry

boundary

public Geometry boundary()
                  throws com.esri.sde.sdk.geom.SeGeometryException
Boundary takes a geometry object and returns its combined boundary as a geometry object.

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

buffer

public 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
Specified by:
buffer in class SeGeometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

isSimple

public boolean isSimple()
Returns t (TRUE) if the geometry object is simple otherwise, it returns f (FALSE).

Specified by:
isSimple in interface Geometry
Specified by:
isSimple in class SeGeometry

isEmpty

public boolean isEmpty()
Returns t (TRUE) if the geometry is empty; otherwise returns f (FALSE).

Specified by:
isEmpty in interface Geometry
Specified by:
isEmpty in class SeGeometry

numPoints

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

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

envelope

public 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
Specified by:
envelope in class SeGeometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

dimension

public int dimension()
Returns the dimension of a geometry object.

Specified by:
dimension in interface Geometry
Specified by:
dimension in class SeGeometry

isMeasured

public boolean isMeasured()
Returns t (TRUE) if the geometry object has measures; otherwise, returns f (FALSE).

Specified by:
isMeasured in interface Geometry
Specified by:
isMeasured in class SeGeometry

is3D

public boolean is3D()
Returns t (TRUE) if the geometry object has three-dimensional coordinates; otherwise, returns f (FALSE).

Specified by:
is3D in interface Geometry
Specified by:
is3D in class SeGeometry

geometryType

public java.lang.String geometryType()
Geometrytype takes a geometry object and returns its geometry type as a string.

Specified by:
geometryType in interface Geometry
Specified by:
geometryType in class SeGeometry

convexhull

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

Specified by:
convexhull in interface Geometry
Specified by:
convexhull in class SeGeometry
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
Overrides:
locateAlong in class SeGeometry
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
Overrides:
locateBetween in class SeGeometry
Throws:
com.esri.sde.sdk.geom.SeGeometryException

getXYs

public SePoint[] getXYs()

getMs

public double[] getMs()

getZs

public double[] getZs()

toString

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