001    /*
002     *    GeoAPI - Java interfaces for OGC/ISO standards
003     *    http://www.geoapi.org
004     *
005     *    Copyright (C) 2004-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.referencing.operation;
033    
034    import java.util.Map;
035    import org.opengis.referencing.IdentifiedObject;
036    import org.opengis.parameter.ParameterDescriptorGroup;
037    import org.opengis.annotation.UML;
038    
039    import static org.opengis.annotation.Obligation.*;
040    import static org.opengis.annotation.Specification.*;
041    
042    
043    /**
044     * Definition of an algorithm used to perform a coordinate operation. Most operation
045     * methods use a number of operation parameters, although some coordinate conversions
046     * use none. Each coordinate operation using the method assigns values to these parameters.
047     *
048     * @author  Martin Desruisseaux (IRD)
049     * @version 3.0
050     * @since   1.0
051     *
052     * @navassoc 1 - - Formula
053     * @navassoc 1 - - ParameterDescriptorGroup
054     *
055     * @see CoordinateOperation
056     * @see MathTransformFactory#getAvailableMethods(Class)
057     * @see CoordinateOperationFactory#getOperationMethod(String)
058     * @see CoordinateOperationAuthorityFactory#createOperationMethod(String)
059     * @see CoordinateOperationFactory#createOperationMethod(Map, Integer, Integer, ParameterDescriptorGroup)
060     */
061    @UML(identifier="CC_OperationMethod", specification=ISO_19111)
062    public interface OperationMethod extends IdentifiedObject {
063        /**
064         * Key for the <code>{@value}</code> property.
065         * This is used for setting the value to be returned by {@link #getFormula()}.
066         *
067         * @see #getFormula()
068         */
069        String FORMULA_KEY = "formula";
070    
071        /**
072         * Formula(s) or procedure used by this operation method. This may be a reference to a
073         * publication. Note that the operation method may not be analytic, in which case this
074         * attribute references or contains the procedure, not an analytic formula.
075         *
076         * @return The formula used by this method.
077         */
078        @UML(identifier="formulaReference", obligation=MANDATORY, specification=ISO_19111)
079        Formula getFormula();
080    
081        /**
082         * Number of dimensions in the source CRS of this operation method.
083         * Note that some operation methods work with an arbitrary number of
084         * dimensions (e.g. <cite>Affine Transform</cite>) and may return {@code null}.
085         *
086         * @return The dimension of source CRS, or {@code null} if unknown.
087         */
088        @UML(identifier="sourceDimensions", obligation=OPTIONAL, specification=ISO_19111)
089        Integer getSourceDimensions();
090    
091        /**
092         * Number of dimensions in the target CRS of this operation method.
093         * Note that some operation methods work with an arbitrary number of
094         * dimensions (e.g. <cite>Affine Transform</cite>) and may return {@code null}.
095         *
096         * @return The dimension of target CRS, or {@code null} if unknown.
097         */
098        @UML(identifier="targetDimensions", obligation=OPTIONAL, specification=ISO_19111)
099        Integer getTargetDimensions();
100    
101        /**
102         * The set of parameters.
103         *
104         * @return The parameters, or an empty group if none.
105         */
106        @UML(identifier="parameter", obligation=MANDATORY, specification=ISO_19111)
107        ParameterDescriptorGroup getParameters();
108    }