001 /*
002 * GeoAPI - Java interfaces for OGC/ISO standards
003 * http://www.geoapi.org
004 *
005 * Copyright (C) 2004-2012 Open Geospatial Consortium, Inc.
006 * All Rights Reserved. http://www.opengeospatial.org/ogc/legal
007 *
008 * Permission to use, copy, and modify this software and its documentation, with
009 * or without modification, for any purpose and without fee or royalty is hereby
010 * granted, provided that you include the following on ALL copies of the software
011 * and documentation or portions thereof, including modifications, that you make:
012 *
013 * 1. The full text of this NOTICE in a location viewable to users of the
014 * redistributed or derivative work.
015 * 2. Notice of any changes or modifications to the OGC files, including the
016 * date changes were made.
017 *
018 * THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE
019 * NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
020 * TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT
021 * THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY
022 * PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
023 *
024 * COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
025 * CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
026 *
027 * The name and trademarks of copyright holders may NOT be used in advertising or
028 * publicity pertaining to the software without specific, written prior permission.
029 * Title to copyright in this software and any associated documentation will at all
030 * times remain with copyright holders.
031 */
032 package org.opengis.geometry.primitive;
033
034 import java.util.List;
035 import org.opengis.annotation.UML;
036
037 import static org.opengis.annotation.Obligation.*;
038 import static org.opengis.annotation.Specification.*;
039
040
041 /**
042 * The boundary of {@linkplain Surface surfaces}. A {@code SurfaceBoundary} consists of some number
043 * of {@linkplain Ring rings}, corresponding to the various components of its boundary. In the normal 2D
044 * case, one of these rings is distinguished as being the exterior boundary. In a general manifold this
045 * is not always possible, in which case all boundaries shall be listed as interior boundaries,
046 * and the exterior will be empty.
047 *
048 * <blockquote><font size=2>
049 * <strong>NOTE:</strong> The use of exterior and interior here is not intended to invoke the
050 * definitions of "interior" and "exterior" of geometric objects. The terms are in common usage,
051 * and reflect a linguistic metaphor that uses the same linguistic constructs for the concept of
052 * being inside an object to being inside a container. In normal mathematical terms, the exterior
053 * boundary is the one that appears in the Jordan Separation Theorem (Jordan Curve Theorem extended
054 * beyond 2D). The exterior boundary is the one that separates the surface (or solid in 3D) from
055 * infinite space. The interior boundaries separate the object at hand from other bounded objects.
056 * The uniqueness of the exterior comes from the uniqueness of unbounded space. Essentially, the
057 * Jordan Separation Theorem shows that normal 2D or 3D space separates into bounded and unbounded
058 * pieces by the insertion of a ring or shell, respectively. It goes beyond that, but this
059 * specification is restricted to at most 3 dimensions.
060 * <p>
061 * <strong>EXAMPLE 1:</strong> If the underlying manifold is an infinite cylinder, then two
062 * transverse cuts of the cylinder define a compact surface between the cuts, and two separate
063 * unbounded portions of the cylinders. In this case, either cut could reasonably be called
064 * exterior. In cases of such ambiguity, the standard chooses to list all boundaries in the
065 * "interior" set. The only guarantee of an exterior boundary being unique is in the 2-dimensional
066 * plane, E<sup>2</sup>.
067 * <p>
068 * <strong>EXAMPLE 2:</strong> Taking the equator of a sphere, and generating a 1 meter buffer,
069 * we have a surface with two isomorphic boundary components. There is no unbiased manner to
070 * distinguish one of these as an exterior.
071 * </font></blockquote>
072 *
073 * @version <A HREF="http://www.opengeospatial.org/standards/as">ISO 19107</A>
074 * @author Martin Desruisseaux (IRD)
075 * @since GeoAPI 1.0
076 *
077 * @see SolidBoundary
078 */
079 @UML(identifier="GM_SurfaceBoundary", specification=ISO_19107)
080 public interface SurfaceBoundary extends PrimitiveBoundary {
081 /**
082 * Returns the exterior ring, or {@code null} if none.
083 *
084 * @return The exterior ring, or {@code null}.
085 */
086 @UML(identifier="exterior", obligation=MANDATORY, specification=ISO_19107)
087 Ring getExterior();
088
089 /**
090 * Returns the interior rings.
091 *
092 * @return The interior rings. Never {@code null}, but may be an empty array.
093 *
094 * @todo Consider using a Collection return type instead.
095 */
096 @UML(identifier="interior", obligation=MANDATORY, specification=ISO_19107)
097 List<Ring> getInteriors();
098 }