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 org.opengis.geometry.coordinate.GenericSurface;
035 import org.opengis.annotation.Association;
036 import org.opengis.annotation.UML;
037
038 import static org.opengis.annotation.Obligation.*;
039 import static org.opengis.annotation.Specification.*;
040
041
042 /**
043 * Defines a homogeneous portion of a {@linkplain Surface surface}.
044 * Each {@code SurfacePatch} shall be in at most one {@linkplain Surface surface}.
045 *
046 * @version <A HREF="http://www.opengeospatial.org/standards/as">ISO 19107</A>
047 * @author Martin Desruisseaux (IRD)
048 * @since GeoAPI 1.0
049 */
050 @UML(identifier="GM_SurfacePatch", specification=ISO_19107)
051 public interface SurfacePatch extends GenericSurface {
052 /**
053 * Returns the patch which own this surface patch. This method is <em>optional</em> since the
054 * association in ISO 19107 is navigable only from {@code Surface} to {@code SurfacePatch},
055 * not the other way.
056 *
057 * <blockquote><font size=2>
058 * <strong>NOTE:</strong> In the specification, surface patches do not appear except in the
059 * context of a surface, and therefore this method should never returns {@code null} which
060 * would preclude the use of surface patches except in this manner. While this would not
061 * affect the specification, allowing {@code null} owner allows other standards based on
062 * ISO 19107 one to use surface patches in a more open-ended manner.
063 * </font></blockquote>
064 *
065 * @return The owner of this surface patch, or {@code null} if the association is
066 * not available or not implemented that way.
067 *
068 * @see Surface#getPatches
069 * @see CurveSegment#getCurve
070 * @issue http://jira.codehaus.org/browse/GEO-63
071 */
072 @Association("Segmentation")
073 @UML(identifier="surface", obligation=OPTIONAL, specification=ISO_19107)
074 Surface getSurface();
075
076 /**
077 * Determines the surface interpolation mechanism used for this {@code SurfacePatch}.
078 * This mechanism uses the control points and control parameters defined in the various
079 * subclasses to determine the position of this {@code SurfacePatch}.
080 *
081 * @return The interpolation mechanism.
082 */
083 @UML(identifier="interpolation", obligation=MANDATORY, specification=ISO_19107)
084 SurfaceInterpolation getInterpolation();
085
086 /**
087 * Specifies the type of continuity between this surface patch and its immediate neighbors
088 * with which it shares a boundary curve. The sequence of values corresponds to the
089 * {@linkplain Ring rings} in the {@linkplain SurfaceBoundary surface boundary} returned by
090 * {@link #getBoundary} for this patch. The default value of "0" means simple continuity, which
091 * is a mandatory minimum level of continuity. This level is referred to as "C<sup>0</sup>" in
092 * mathematical texts. A value of 1 means that the functions are continuous and differentiable
093 * at the appropriate end point: "C<sup>1</sup>" continuity. A value of "n" for any integer means
094 * <var>n</var>-times differentiable: "C<sup>n</sup>" continuity.
095 *
096 * @return The type of continuity between this surface patch and its immediate neighbors.
097 */
098 @UML(identifier="numDerivativesOnBoundary", obligation=MANDATORY, specification=ISO_19107)
099 int getNumDerivativesOnBoundary();
100
101 /**
102 * Returns the boundary of this {@code SurfacePatch} represented as a collection of
103 * {@linkplain OrientableCurve orientable curves} organized into {@linkplain Ring rings}
104 * by a {@linkplain SurfaceBoundary surface boundary}. The semantics of this operation is
105 * the same as that of {@link Surface#getBoundary()}, except that the curves used here may
106 * be not be persistent {@linkplain OrientableCurve orientable curve} instances. Transient
107 * data type values of {@linkplain Curve curve} are also valid. In the normal case,
108 * {@code SurfacePatch}es will share parts of their boundary with the aggregate
109 * {@linkplain Surface surface}, and other parts with {@code SurfacePatch}es (not
110 * necessarily distinct).
111 *
112 * @return The boundary of this {@code SurfacePatch}
113 */
114 @UML(identifier="boundary", obligation=MANDATORY, specification=ISO_19107)
115 SurfaceBoundary getBoundary();
116 }