001/* 002 * GeoAPI - Java interfaces for OGC/ISO standards 003 * Copyright © 2009-2023 Open Geospatial Consortium, Inc. 004 * http://www.geoapi.org 005 * 006 * Licensed under the Apache License, Version 2.0 (the "License"); 007 * you may not use this file except in compliance with the License. 008 * You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018package org.opengis.referencing.operation; 019 020import org.opengis.metadata.citation.Citation; 021import org.opengis.util.InternationalString; 022import org.opengis.annotation.Classifier; 023import org.opengis.annotation.Stereotype; 024import org.opengis.annotation.UML; 025 026import static org.opengis.annotation.Obligation.*; 027import static org.opengis.annotation.Specification.*; 028 029 030/** 031 * Specification of the coordinate operation method formula. 032 * A formula may be {@linkplain #getFormula() given textually}, 033 * or may be a {@linkplain #getCitation() reference to a publication}. 034 * If the operation method is not analytic, then {@code Formula} actually gives 035 * the procedure rather than an analytic formula. 036 * 037 * <p>Formulas are given by {@link OperationMethod#getFormula()}. 038 * {@code Formula} objects are for human reading; the object that actually does the work 039 * of applying the formula or procedure to coordinate values is {@link MathTransform}.</p> 040 * 041 * @author OGC Topic 2 (for abstract model and documentation) 042 * @author Martin Desruisseaux (Geomatys) 043 * @version 3.1 044 * @since 2.3 045 * 046 * @see MathTransform 047 * @see OperationMethod#getFormula() 048 */ 049@Classifier(Stereotype.UNION) 050@UML(identifier="Formula", specification=ISO_19111) 051public interface Formula { 052 /** 053 * Returns the formula(s) or procedure used by this operation method. 054 * At least one of {@code getFormula()} and {@link #getCitation()} shall be supplied. 055 * 056 * @return the formula used by the operation method, or {@code null} if none. 057 */ 058 @UML(identifier="formula", obligation=CONDITIONAL, specification=ISO_19111) 059 InternationalString getFormula(); 060 061 /** 062 * Returns a reference to a publication giving the formula(s) or procedure used by this operation method. 063 * At least one of {@link #getFormula()} and {@code getCitation()} shall be supplied. 064 * 065 * @return reference to a publication giving the formula, or {@code null} if none. 066 */ 067 @UML(identifier="formulaCitation", obligation=CONDITIONAL, specification=ISO_19111) 068 Citation getCitation(); 069}