001    /*
002     *    GeoAPI - Java interfaces for OGC/ISO standards
003     *    http://www.geoapi.org
004     *
005     *    Copyright (C) 2005-2013 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.coverage;
033    
034    import java.util.Set;
035    import java.util.Collection; // For javadoc
036    import org.opengis.geometry.DirectPosition;
037    import org.opengis.util.Record;
038    import org.opengis.annotation.UML;
039    
040    import static org.opengis.annotation.Obligation.*;
041    import static org.opengis.annotation.Specification.*;
042    
043    
044    /**
045     * Basis for interpolating feature attribute values within a {@linkplain ContinuousCoverage
046     * continuous coverage}. {@code ValueObject}s may be generated in the execution of an
047     * {@link Coverage#evaluate(DirectPosition,Collection) evaluate} operation, and need not
048     * be persistent.
049     *
050     * @version ISO 19123:2004
051     * @author  Martin Desruisseaux (IRD)
052     * @since   GeoAPI 2.1
053     */
054    @UML(identifier="CV_ValueObject", specification=ISO_19123)
055    public interface ValueObject {
056        /**
057         * Returns the set of <var>geometry</var>-<var>value</var> pairs that provide the basis for
058         * constructing this {@code ValueObject} and for evaluating the {@linkplain ContinuousCoverage
059         * continuous coverage} at {@linkplain DirectPosition direct positions} within this value object.
060         *
061         * @return The control values.
062         */
063        @UML(identifier="controlValue", obligation=MANDATORY, specification=ISO_19123)
064        Set<? extends GeometryValuePair> getControlValues();
065    
066        /**
067         * The domain object constructed from the {@linkplain GeometryValuePair#getGeometry
068         * domain objects} of the <var>geometry</var>-<var>value</var> pairs that are linked
069         * to this value object by the {@linkplain #getControlValues control values}.
070         *
071         * @return The domain.
072         */
073        @UML(identifier="geometry", obligation=MANDATORY, specification=ISO_19123)
074        DomainObject<?> getGeometry();
075    
076        /**
077         * Holds the values of the parameters required to execute the interpolate operation, as
078         * specified by the {@linkplain ContinuousCoverage#getInterpolationParameterTypes
079         * interpolation parameter types} attribute of the continuous coverage.
080         *
081         * @return The interpolation parameters.
082         *
083         * @todo Consider leveraging the parameter package.
084         */
085        @UML(identifier="interpolationParameters", obligation=OPTIONAL, specification=ISO_19123)
086        Record getInterpolationParameters();
087    
088        /**
089         * Returns the record of feature attribute values computed for the specified direct position.
090         *
091         * @param p The position where to compute values.
092         * @return The feature attribute values.
093         */
094        @UML(identifier="interpolate", obligation=MANDATORY, specification=ISO_19123)
095        Record interpolate(DirectPosition p);
096    }