All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opengis.geometry.coordinate.Position Maven / Gradle / Ivy

There is a newer version: 24.2-oss84-1
Show newest version
/*
 *    GeoTools - The Open Source Java GIS Toolkit
 *    http://geotools.org
 *
 *    (C) 2011, Open Source Geospatial Foundation (OSGeo)
 *    (C) 2003-2005, Open Geospatial Consortium Inc.
 *
 *    All Rights Reserved. http://www.opengis.org/legal/
 */
package org.opengis.geometry.coordinate;

import static org.opengis.annotation.Obligation.*;
import static org.opengis.annotation.Specification.*;

import org.opengis.annotation.UML;
import org.opengis.geometry.DirectPosition;
import org.opengis.geometry.primitive.Point;

/**
 * A type consisting of either a {@linkplain DirectPosition direct position} or of a {@linkplain
 * Point point} from which a {@linkplain DirectPosition direct position} shall be obtained. The use
 * of this data type allows the identification of a position either directly as a coordinate
 * (variant direct) or indirectly as a {@linkplain Point point} (variant indirect).
 *
 * @departure ISO 19111 defines {@code Position} like a C/C++ {@code union} of {@code
 *     DirectPosition} and {@code Point}. Since unions are not allowed in Java, GeoAPI defines
 *     {@code Position} as the base interface of the above. This leads to a slightly different
 *     semantic since ISO defines {@link #getDirectPosition} as conditional, while GeoAPI defines it
 *     as mandatory by allowing the method to return {@code this}.
 * @version ISO 19107
 * @author Martin Desruisseaux (IRD)
 * @since GeoAPI 1.0
 * @issue http://jira.codehaus.org/browse/GEO-87
 */
@UML(identifier = "GM_Position", specification = ISO_19107)
public interface Position {

    /**
     * Returns the direct position. This method shall never returns {@code null}, but may returns
     * {@code this} if invoked on an object which is already a {@code DirectPosition} instance.
     *
     * @return The direct position (may be {@code this}).
     * @since GeoAPI 2.2
     */
    @UML(identifier = "direct", obligation = CONDITIONAL, specification = ISO_19107)
    DirectPosition getDirectPosition();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy