001/* 002 * GeoAPI - Java interfaces for OGC/ISO standards 003 * Copyright © 2003-2024 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.crs; 019 020import java.util.Map; 021import org.opengis.referencing.cs.VerticalCS; 022import org.opengis.referencing.datum.VerticalDatum; 023import org.opengis.referencing.datum.DatumEnsemble; 024import org.opengis.annotation.UML; 025 026import static org.opengis.annotation.Obligation.*; 027import static org.opengis.annotation.Specification.*; 028 029 030/** 031 * A 1-dimensional <abbr>CRS</abbr> used for recording heights or depths. 032 * Vertical <abbr>CRS</abbr>s make use of the direction of gravity to define the concept of height or depth, 033 * but the relationship with gravity may not be straightforward. 034 * 035 * <p>By implication, ellipsoidal heights (<var>h</var>) cannot be captured in a vertical <abbr>CRS</abbr>. 036 * Ellipsoidal heights cannot exist independently, but only as inseparable part of a 3D coordinate tuple 037 * defined in a geographic or projected 3D <abbr>CRS</abbr>.</p> 038 * 039 * <h2>Permitted coordinate systems</h2> 040 * This type of <abbr>CRS</abbr> can be used with coordinate systems of type {@link VerticalCS} only. 041 * 042 * @author OGC Topic 2 (for abstract model and documentation) 043 * @author Martin Desruisseaux (IRD, Geomatys) 044 * @version 3.1 045 * @since 1.0 046 * 047 * @see CRSAuthorityFactory#createVerticalCRS(String) 048 * @see CRSFactory#createVerticalCRS(Map, VerticalDatum, DatumEnsemble, VerticalCS) 049 */ 050@UML(identifier="VerticalCRS", specification=ISO_19111) 051public interface VerticalCRS extends SingleCRS { 052 /** 053 * Returns the coordinate system, which shall be vertical. 054 * 055 * @return the vertical coordinate system. 056 */ 057 @Override 058 @UML(identifier="coordinateSystem", obligation=MANDATORY, specification=ISO_19111) 059 VerticalCS getCoordinateSystem(); 060 061 /** 062 * Returns the reference frame, which shall be vertical. 063 * This property may be null if this <abbr>CRS</abbr> is related to an object 064 * identified only by a {@linkplain #getDatumEnsemble() datum ensemble}. 065 * 066 * @return the reference frame, or {@code null} if this <abbr>CRS</abbr> is related to 067 * an object identified only by a {@linkplain #getDatumEnsemble() datum ensemble}. 068 * 069 * @condition Mandatory if the {@linkplain #getDatumEnsemble() datum ensemble} is not documented. 070 */ 071 @Override 072 @UML(identifier="datum", obligation=CONDITIONAL, specification=ISO_19111) 073 VerticalDatum getDatum(); 074 075 /** 076 * Returns the datum ensemble, which shall have vertical datum members. 077 * This property may be null if this <abbr>CRS</abbr> is related to an object 078 * identified only by a single {@linkplain #getDatum() datum}. 079 * 080 * <p>The default implementation returns {@code null}.</p> 081 * 082 * @return the datum ensemble, or {@code null} if this <abbr>CRS</abbr> is related 083 * to an object identified only by a single {@linkplain #getDatum() datum}. 084 * 085 * @condition Mandatory if the {@linkplain #getDatum() datum} is not documented. 086 * @since 3.1 087 */ 088 @Override 089 @UML(identifier="datum", obligation=CONDITIONAL, specification=ISO_19111) 090 default DatumEnsemble<VerticalDatum> getDatumEnsemble() { 091 return null; 092 } 093}