Spatial DataBlade
JAVA API v8.21

com.ibm.spatial.geom
Class IfxMultiPolygon

java.lang.Object
  extended by com.ibm.spatial.geom.IfxGeometry
      extended by com.ibm.spatial.geom.IfxMultiCoord
          extended by com.ibm.spatial.geom.IfxGeometryCollection
              extended by com.ibm.spatial.geom.IfxMultiPolygon
All Implemented Interfaces:
Geometry, GeometryCollection, MultiPolygon, MultiSurface, java.lang.Cloneable

public class IfxMultiPolygon
extends IfxGeometryCollection
implements MultiPolygon

IfxMultiPolygon implements the MultiPolygon interface.

See Also:
MultiPolygon, IfxGeometryCollection

Field Summary
 
Fields inherited from class com.ibm.spatial.geom.IfxGeometry
COORD_M, COORD_XY, COORD_Z
 
Method Summary
 Point centroid()
          The mathematical centroid for this MultiSurface.
 boolean equals(java.lang.Object anObject)
          Compares this object to the specified object.
 java.lang.String geometryType()
          Gets the most appropriate OGC geometry interface type for this object.
 double length()
          Returns the length of a MultiPolygon, that is 0.
 int numParts()
          Returns the number of parts of this object.
 int numSubParts(int part)
          Returns the number of subparts in the specified part.
 double perimeter()
          Returns the perimeter of this object, as measured in the associated spatial reference system.
 Point pointOnSurface()
          A Point guaranteed to be on this object.
 
Methods inherited from class com.ibm.spatial.geom.IfxGeometryCollection
area, dimension, geometryN, numGeometries, numPoints, numPoints, toArray, toCoordArray, toPointArray
 
Methods inherited from class com.ibm.spatial.geom.IfxMultiCoord
getLabelPoint, is3D, isEmpty, isMeasured
 
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.MultiSurface
area
 
Methods inherited from interface com.ibm.spatial.geom.GeometryCollection
geometryN, numGeometries
 
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

centroid

public Point centroid()
               throws SpatialException
The mathematical centroid for this MultiSurface. The result is not guaranteed to be on this MultiSurface.

Specified by:
centroid in interface MultiSurface
Returns:
a Point representing the centroid of this MultiSurface
Throws:
SpatialException - if an error occurs during the calculation of the centroid point coordinates

pointOnSurface

public Point pointOnSurface()
                     throws SpatialException
A Point guaranteed to be on this object. This implementation calls pointOnSurface on the first member of this MultiPolygon.

Specified by:
pointOnSurface in interface MultiSurface
Returns:
a Point guaranteed to be on this object.
Throws:
SpatialException - if an error occurs during the calculation of the point coordinates

geometryType

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

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

equals

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

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

length

public double length()
Returns the length of a MultiPolygon, that is 0.

Overrides:
length in class IfxMultiCoord
Returns:
the length of this object

perimeter

public double perimeter()
Returns the perimeter of this object, as measured in the associated spatial reference system. This means that holes in surfaces will contribute positively to the total perimeter.

The perimeter is defined as the sum of the lengths of all boundary components.

Specified by:
perimeter in interface MultiSurface
Overrides:
perimeter in class IfxMultiCoord
Returns:
the perimeter of this object
See Also:
IfxMultiCoord.length()

numParts

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

Overrides:
numParts in class IfxGeometryCollection
Returns:
the number of parts
See Also:
IfxGeometry.numParts()

numSubParts

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

Overrides:
numSubParts in class IfxGeometryCollection
Parameters:
part - part index
Returns:
the number of subparts in the specified part
Throws:
java.lang.IndexOutOfBoundsException - - 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.