## org.opengis.geometry.complex
Interface Complex

All Superinterfaces:
  Geometry, TransfiniteSet

All Known Subinterfaces:
  Boundary, ComplexBoundary, Composite, CompositeCurve, CompositePoint, CompositeSolid, CompositeSurface, CurveBoundary, PrimitiveBoundary, Ring, Shell, SolidBoundary, SurfaceBoundary

    @UML(identifier="GM_Complex",
         specification=ISO_19107)
    public interface Complex

extends Geometry

A collection of geometrically disjoint, simple primitives. If a primitive (other than a point is in a particular `Complex`, then there exists a set of primitives of lower dimension in the same complex that form the boundary of this primitive.

A geometric complex can be thought of as a set in two distinct ways. First, it is a finite set of objects (via delegation to its elements member) and, second, it is an infinite set of point values as a subtype of geometric object. The dual use of delegation and subtyping is to disambiguate the two types of set interface. To determine if a primitive P is an element of a `Complex` C, call: `C.element().contains(P)`.

The "elements" attribute allows `Complex` to inherit the behavior of `Set<Primitive>` without confusing the same sort of behavior inherited from `TransfiniteSet<DirectPosition>` inherited through `Geometry`. Complexes shall be used in application schemas where the sharing of geometry is important, such as in the use of computational topology. In a complex, primitives may be aggregated many-to-many into composites for use as attributes of features.

Since:
  GeoAPI 1.0
Version:
  ISO 19107
TODO:
  Some associations are commented out for now.

Method Summary
`Collection<? extends Primitive>` `getElements()` Returns the collection of primitives contained in this complex.
`Complex[]` `getSubComplexes()` Returns a subset of the primitives of that complex that is, in its own right, a geometric complex.
`Complex[]` `getSuperComplexes()` Returns a superset of primitives that is also a complex.
`boolean` `isMaximal()` Returns `true` if and only if this `Complex` is maximal.

Methods inherited from interface Geometry
`clone, distance, getBoundary, getBuffer, getCentroid, getClosure, getConvexHull, getCoordinateDimension, getCoordinateReferenceSystem, getDimension, getDistance, getEnvelope, getMaximalComplex, getMbRegion, getPrecision, getRepresentativePoint, isCycle, isMutable, isSimple, toImmutable, transform, transform`

Methods inherited from interface TransfiniteSet
`contains, contains, difference, equals, intersection, intersects, symmetricDifference, union`

Method Detail

### isMaximal

    @UML(identifier="isMaximal",
         obligation=MANDATORY,
         specification=ISO_19107)
    boolean isMaximal()

  Returns `true` if and only if this `Complex` is maximal. A complex is maximal if it is a subcomplex of no larger complex.

  Returns:
    `true` if this complex is maximal.

### getSuperComplexes

    @UML(identifier="superComplex",
         obligation=MANDATORY,
         specification=ISO_19107)
    Complex[] getSuperComplexes()

  Returns a superset of primitives that is also a complex.

  Returns:
    The supercomplexes, or an empty array if none.
  TODO:
    Consider using a Collection return type instead.

### getSubComplexes

    @UML(identifier="subComplex",
         obligation=MANDATORY,
         specification=ISO_19107)
    Complex[] getSubComplexes()

  Returns a subset of the primitives of that complex that is, in its own right, a geometric complex.

  Returns:
    The subcomplexes, or an empty array if none.
  TODO:
    Consider using a Collection return type instead.

### getElements

    @UML(identifier="element",
         obligation=MANDATORY,
         specification=ISO_19107)
    Collection<? extends Primitive> getElements()

  Returns the collection of primitives contained in this complex.

  Returns:
    The collection of primitives for this complex.

Copyright © 1994-2008 Open Geospatial Consortium. All Rights Reserved.