Spatial DataBlade
JAVA API v8.21

com.ibm.spatial.geom
Class IfxPolygon

java.lang.Object
  extended by com.ibm.spatial.geom.IfxGeometry
      extended by com.ibm.spatial.geom.IfxMultiCoord
          extended by com.ibm.spatial.geom.IfxSurface
              extended by com.ibm.spatial.geom.IfxPolygon
All Implemented Interfaces:
Geometry, Polygon, Surface, java.lang.Cloneable

public class IfxPolygon
extends IfxSurface
implements Polygon

IfxPolygon is a planar IfxSurface, defined by 1 exterior boundary and 0 or more interior boundaries, with linear interpolation between vertices. IfxPolygon implements the Polygon interface.

See Also:
IfxGeometry, Polygon

Field Summary
 
Fields inherited from class com.ibm.spatial.geom.IfxGeometry
COORD_M, COORD_XY, COORD_Z
 
Method Summary
 double area()
          Returns the area of this object, as measured in the spatial reference system of this object.
 boolean equals(java.lang.Object anObject)
          Compares this IfxPolygon to the specified object.
 LineString exteriorRing()
          Returns the exterior ring of a Polygon.
 java.lang.String geometryType()
          Gets the most appropriate OGC geometry interface type for this object.
 LineString interiorRingN(int index)
          Returns the interior ring at the specified position in this Polygon.
 int numInteriorRings()
          Returns the number of interior rings in this Polygon.
 int numParts()
          Returns the number of parts of this object.
 int numSubParts(int part)
          Returns the number of subparts in the specified part.
 
Methods inherited from class com.ibm.spatial.geom.IfxSurface
centroid, dimension, length, perimeter, pointOnSurface
 
Methods inherited from class com.ibm.spatial.geom.IfxMultiCoord
getLabelPoint, is3D, isEmpty, isMeasured, numPoints, numPoints, toCoordArray, toPointArray
 
Methods inherited from class com.ibm.spatial.geom.IfxGeometry
asBinary, asText, boundary, buffer, clone, contains, convexHull, crosses, difference, disjoint, distance, envelope, envelopesIntersect, extent, exterior, getCoordinateDimension, getDimensionality, getLabelPoint, getOGCType, interior, intersection, intersects, isSimple, isValid, locateAlong, locateBetween, overlaps, srid, symmetricDiff, toString, touches, union, within
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.spatial.geom.Surface
centroid, perimeter, pointOnSurface
 
Methods inherited from interface com.ibm.spatial.geom.Geometry
asBinary, asText, boundary, buffer, contains, convexHull, crosses, difference, dimension, disjoint, distance, envelope, envelopesIntersect, extent, exterior, interior, intersection, intersects, is3D, isEmpty, isMeasured, isSimple, isValid, locateAlong, locateBetween, numPoints, overlaps, srid, symmetricDiff, touches, union, within
 

Method Detail

exteriorRing

public LineString exteriorRing()
Returns the exterior ring of a Polygon.

Specified by:
exteriorRing in interface Polygon
Returns:
the exterior ring of a Polygon as a LineString.

interiorRingN

public LineString interiorRingN(int index)
Returns the interior ring at the specified position in this Polygon. The index order of rings is assigned by the Polygon and is not guaranteed to have any geometric significance. Index range is 0 to numInteriorRings() - 1.

Specified by:
interiorRingN in interface Polygon
Parameters:
index - index of element to return.
Returns:
the interior ring at the specified position in this Polygon.
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= numInteriorRings()-1).
See Also:
numInteriorRings(), LineString

numInteriorRings

public int numInteriorRings()
Returns the number of interior rings in this Polygon.

Specified by:
numInteriorRings in interface Polygon
Returns:
number of interior rings in this Polygon

area

public double area()
Returns the area of this object, as measured in the spatial reference system of this object.

Specified by:
area in interface Surface
Overrides:
area in class IfxSurface
Returns:
the area of this object in double precision

geometryType

public java.lang.String geometryType()
Gets the most appropriate OGC geometry interface type for this object.

Overrides:
geometryType in class IfxSurface
Returns:
a string that identifies the OGC interface related to this geometry

equals

public boolean equals(java.lang.Object anObject)
Compares this IfxPolygon to the specified object. The result is true if and only if the argument is not null and is a IfxPolygon object that represents the same sequence of coordinates as this object.

The coordinates are compared within the precision specified by this object's SRS.

Specified by:
equals in interface Geometry
Overrides:
equals in class IfxMultiCoord
Parameters:
anObject - the object to compare this IfxPolygon against.
Returns:
true if the IfxPolygons are equal; false otherwise.

numParts

public int numParts()
Returns the number of parts of this object.

Overrides:
numParts in class IfxMultiCoord
Returns:
the number of parts

numSubParts

public int numSubParts(int part)
Returns the number of subparts in the specified part.

Overrides:
numSubParts in class IfxMultiCoord
Parameters:
part - part index
Returns:
the number of subparts in the specified part
Throws:
java.lang.IndexOutOfBoundsException - - for non-empty geometries, if the given part index is out of range (part < 0 || part >= numParts()).
See Also:
numParts()

Spatial DataBlade
JAVA API v8.21


Licensed Materials - Property of IBM
Copyright IBM Corp. 2002, 2012 All Rights Reserved.