Spatial DataBlade
JAVA API v8.21

com.ibm.spatial.geom
Interface Polygon

All Superinterfaces:
Geometry, Surface
All Known Implementing Classes:
IfxPolygon

public interface Polygon
extends Surface

A Polygon is a planar Surface, defined by 1 exterior boundary and 0 or more interior boundaries. Each interior boundary defines a hole in the Polygon.

    The rules that define valid polygons are:
  1. Polygons are topologically closed.
  2. The boundary of a Polygon consists of a set of LinearRings that make up its exterior and interior boundaries.
  3. No two rings in the boundary cross, the rings in the boundary of a Polygon may intersect at a Point but only as a tangent.
  4. A Polygon may not have cut lines, spikes or punctures.
  5. The interior of every Polygon is a connected point set.
  6. The exterior of a Polygon with 1 or more holes is not connected. Each hole defines a connected component of the exterior.

The combination of 1 and 3 make a Polygon a regular closed point set.

Polygons are simple geometries.

See Also:
Surface, Geometry, MultiPolygon

Method Summary
 LineString exteriorRing()
          Returns the exterior ring of a Polygon.
 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.
 
Methods inherited from interface com.ibm.spatial.geom.Surface
area, 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, equals, extent, exterior, interior, intersection, intersects, is3D, isEmpty, isMeasured, isSimple, isValid, locateAlong, locateBetween, numPoints, overlaps, srid, symmetricDiff, touches, union, within
 

Method Detail

exteriorRing

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

Returns:
the exterior ring of a Polygon as a LineString.

interiorRingN

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 NumRings-1.

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 >= NumRings-1).
See Also:
LineString

numInteriorRings

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

Returns:
number of interior rings in this Polygon

Spatial DataBlade
JAVA API v8.21


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