Spatial DataBlade
JAVA API v8.21

com.ibm.spatial.geom
Class IfxSurface

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

public abstract class IfxSurface
extends IfxMultiCoord
implements Surface

IfxSurface is an abstract class that does a partial implementation of two dimensional geometric objects.

See Also:
IfxGeometry, Surface

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 Surface, as measured in the spatial reference system of this Surface.
 Point centroid()
          The mathematical centroid for this Surface as a Point.
 int dimension()
          Returns the dimension of this geometry object.
 java.lang.String geometryType()
          Gets the most appropriate OGC geometry interface type for this object.
 double length()
          Returns the length of this object.
 double perimeter()
          Returns the perimeter of this object, as measured in the associated spatial reference system.
 Point pointOnSurface()
          Returns a point guaranteed to be on this Surface.
 
Methods inherited from class com.ibm.spatial.geom.IfxMultiCoord
equals, getLabelPoint, is3D, isEmpty, isMeasured, numParts, numPoints, numPoints, numSubParts, 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.Geometry
asBinary, asText, boundary, buffer, contains, convexHull, crosses, difference, disjoint, distance, envelope, envelopesIntersect, equals, extent, exterior, interior, intersection, intersects, is3D, isEmpty, isMeasured, isSimple, isValid, locateAlong, locateBetween, numPoints, overlaps, srid, symmetricDiff, touches, union, within
 

Method Detail

area

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

Specified by:
area in interface Surface
Overrides:
area in class IfxGeometry
Returns:
the area of this surface in double precision

centroid

public Point centroid()
               throws SpatialException
The mathematical centroid for this Surface as a Point.

The Surface interface specifies that the result of this method is not guaranteed to be on this Surface. This implementation calls getLabelPoint.

Specified by:
centroid in interface Surface
Returns:
a Point representing the centroid of this surface
Throws:
SpatialException - if an error occurs during the calculation of the centroid point coordinates
See Also:
IfxMultiCoord.getLabelPoint(com.ibm.spatial.geom.CoordPoint)

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 Surface
Overrides:
perimeter in class IfxMultiCoord
Returns:
the perimeter of this Surface
See Also:
IfxMultiCoord.length()

pointOnSurface

public Point pointOnSurface()
                     throws SpatialException
Returns a point guaranteed to be on this Surface.

This implementation calculates the point by calling the centroid method. If implementations of centroid() in derived classes do not guarantee that the result is on this Surface, then this method should be overridden.

Specified by:
pointOnSurface in interface Surface
Returns:
a Point guaranteed to be on this Surface
Throws:
SpatialException - if an error occurs during the calculation of the point coordinates
See Also:
IfxMultiCoord.getLabelPoint(com.ibm.spatial.geom.CoordPoint)

geometryType

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

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

length

public double length()
Returns the length of this object. Objects with dimension 0 or 2 have a length equal to zero.

Overrides:
length in class IfxMultiCoord
Returns:
Returns the length of this object in its associated spatial reference.

dimension

public int dimension()

Returns the dimension of this geometry object. A geometry's dimension can be:

Specified by:
dimension in interface Geometry
Specified by:
dimension in class IfxGeometry
Returns:
The dimension of this geometry.

Spatial DataBlade
JAVA API v8.21


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