001/*
002 *    GeoAPI - Java interfaces for OGC/ISO standards
003 *    Copyright © 2003-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.datum;
019
020import java.util.Map;
021import javax.measure.Unit;
022import javax.measure.quantity.Angle;
023import org.opengis.referencing.IdentifiedObject;
024import org.opengis.annotation.UML;
025
026import static org.opengis.annotation.Obligation.*;
027import static org.opengis.annotation.Specification.*;
028
029
030/**
031 * Definition of the origin from which longitude values are determined.
032 * Most geodetic reference frames use Greenwich as their prime meridian.
033 *
034 * @author  OGC Topic 2 (for abstract model and documentation)
035 * @author  Martin Desruisseaux (IRD, Geomatys)
036 * @version 3.1
037 * @since   1.0
038 *
039 * @see DatumAuthorityFactory#createPrimeMeridian(String)
040 * @see DatumFactory#createPrimeMeridian(Map, double, Unit)
041 */
042@UML(identifier="PrimeMeridian", specification=ISO_19111)
043public interface PrimeMeridian extends IdentifiedObject {
044    /**
045     * Longitude of the prime meridian measured from the internationally-recognized reference meridian,
046     * positive eastward. If the {@linkplain #getName() meridian name} is "Greenwich", then this value
047     * shall be zero.
048     *
049     * @return the prime meridian Greenwich longitude, in {@linkplain #getAngularUnit angular unit}.
050     * @unitof Angle
051     */
052    @UML(identifier="greenwichLongitude", obligation=MANDATORY, specification=ISO_19111)
053    double getGreenwichLongitude();
054
055    /**
056     * Returns the angular unit of the Greenwich longitude.
057     *
058     * @departure historic
059     *   This attribute is inherited from an older OGC specification.
060     *   In ISO 19111, {@code greenwichLongitude} is a property of type {@code Angle}
061     *   rather than {@code double}, and the unit of measure is part of the {@code Angle} value.
062     *
063     * @return the angular unit of Greenwich longitude.
064     */
065    @UML(identifier="getAngularUnit", specification=OGC_01009)
066    Unit<Angle> getAngularUnit();
067}