001 /*
002 * GeoAPI - Java interfaces for OGC/ISO standards
003 * http://www.geoapi.org
004 *
005 * Copyright (C) 2004-2012 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.geometry.primitive;
033
034 import java.util.List;
035 import org.opengis.geometry.coordinate.GenericCurve;
036 import org.opengis.annotation.Association;
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 * Curve with a positive orientation. {@code Curve} is
045 * a descendent subtype of {@link Primitive} through {@link OrientablePrimitive}. It is the basis
046 * for 1-dimensional geometry. A curve is a continuous image of an open interval and so could be
047 * written as a parameterized function such as
048 *
049 * <code>c(t):(a, b) → E<sup>n</sup></code>
050 *
051 * where "t" is a real parameter and E<sup>n</sup> is Euclidean space of dimension <var>n</var>
052 * (usually 2 or 3, as determined by the coordinate reference system). Any other parameterization
053 * that results in the same image curve, traced in the same direction, such as any linear shifts
054 * and positive scales such as
055 *
056 * <code>e(t) = c(a + t(b-a)):(0,1) → E<sup>n</sup></code>,
057 *
058 * is an equivalent representation of the same curve. For the sake of simplicity, {@code Curve}s
059 * should be parameterized by arc length, so that the parameterization operation inherited from
060 * {@link GenericCurve} will be valid for parameters between 0 and the length of the curve.
061 * <p>
062 * Curves are continuous, connected, and have a measurable length in terms of the coordinate system.
063 * The orientation of the curve is determined by this parameterization, and is consistent with the
064 * tangent function, which approximates the derivative function of the parameterization and shall
065 * always point in the "forward" direction. The parameterization of the reversal of the curve defined
066 * by
067 *
068 * <code>c(t):(a, b) → E<sup>n</sup></code>
069 *
070 * would be defined by a function of the form
071 *
072 * <code>s(t) = c(a + b - t):(a, b) → E<sup>n</sup></code>.
073 *
074 * <p>
075 * A curve is composed of one or more curve segments. Each curve segment within a curve may be
076 * defined using a different interpolation method. The curve segments are connected to one another,
077 * with the end point of each segment except the last being the start point of the next segment in
078 * the segment list.
079 *
080 * @version <A HREF="http://www.opengeospatial.org/standards/as">ISO 19107</A>
081 * @author Martin Desruisseaux (IRD)
082 * @since GeoAPI 1.0
083 *
084 * @see PrimitiveFactory#createCurve
085 */
086 @UML(identifier="GM_Curve", specification=ISO_19107)
087 public interface Curve extends OrientableCurve, GenericCurve {
088 /**
089 * Lists the components {@linkplain CurveSegment curve segments} of {@code Curve}, each
090 * of which defines the direct position of points along a portion of the curve. The order of
091 * the {@linkplain CurveSegment curve segments} is the order in which they are used to trace
092 * this {@code Curve}. For a particular parameter interval, the {@code Curve} and
093 * {@link CurveSegment} agree.
094 *
095 * @return The list of curve segments. Should never be {@code null} neither empty.
096 *
097 * @see CurveSegment#getCurve
098 * @see Surface#getPatches
099 * @issue http://jira.codehaus.org/browse/GEO-63
100 */
101 @Association("Segmentation")
102 @UML(identifier="segment", obligation=MANDATORY, specification=ISO_19107)
103 List<? extends CurveSegment> getSegments();
104
105 /**
106 * Returns the orientable curves associated with this curve.
107 *
108 * @return The orientable curves as an array of length 2.
109 *
110 * @see OrientableCurve#getPrimitive
111 * @issue http://jira.codehaus.org/browse/GEO-63
112 */
113 @Association("Oriented")
114 @UML(identifier="proxy", obligation=MANDATORY, specification=ISO_19107)
115 OrientableCurve[] getProxy();
116 }