001    /*
002     *    GeoAPI - Java interfaces for OGC/ISO standards
003     *    http://www.geoapi.org
004     *
005     *    Copyright (C) 2005-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.coordinate;
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     * A rational or polynomial parametric surface that is represented by control points, basis
043     * functions and possibly weights. If the weights are all equal then the spline is piecewise
044     * polynomial. If they are not equal, then the spline is piecewise rational. If the boolean
045     * {@link #isPolynomial isPolynomial} is set to {@code true} then the weights shall all be
046     * set to 1.
047     *
048     * @version <A HREF="http://www.opengeospatial.org/standards/as">ISO 19107</A>
049     * @author Martin Desruisseaux (IRD)
050     * @since GeoAPI 2.1
051     */
052    @UML(identifier="GM_BSplineSurface", specification=ISO_19107)
053    public interface BSplineSurface extends GriddedSurface {
054        /**
055         * The algebraic degree of the basis functions for the first and second parameter.
056         * If only one value is given, then the two degrees are equal.
057         *
058         * @return The degrees as an array of length 1 or 2.
059         */
060        @UML(identifier="degree", obligation=MANDATORY, specification=ISO_19107)
061        int[] getDegrees();
062    
063        /**
064         * Identifies particular types of surface which this spline is being used to approximate.
065         * It is for information only, used to capture the original intention. If no such approximation
066         * is intended, then this method returns {@code null}.
067         *
068         * @return The type of surface, or {@code null} if this information is not available.
069         */
070        @UML(identifier="surfaceForm", obligation=OPTIONAL, specification=ISO_19107)
071        BSplineSurfaceForm getSurfaceForm();
072    
073        /**
074         * Returns two sequences of distinct knots used to define the B-spline basis functions for
075         * the two parameters. Recall that the knot data type holds information on knot multiplicity.
076         *
077         * @return The sequence of knots as an array of length 2.
078         */
079        @UML(identifier="knot", obligation=MANDATORY, specification=ISO_19107)
080        List<Knot>[] getKnots();
081    
082        /**
083         * Gives the type of knot distribution used in defining this spline. This is for information
084         * only and is set according to the different construction-functions.
085         *
086         * @return The type of knot distribution, or {@code null} if none.
087         */
088        @UML(identifier="knotSpec", obligation=OPTIONAL, specification=ISO_19107)
089        KnotType getKnotSpec();
090    
091        /**
092         * Returns {@code true} if this is a polynomial spline.
093         */
094        @UML(identifier="isPolynomial", obligation=MANDATORY, specification=ISO_19107)
095        boolean isPolynomial();
096    }