001 /*
002 * GeoAPI - Java interfaces for OGC/ISO standards
003 * http://www.geoapi.org
004 *
005 * Copyright (C) 2005-2013 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.coverage;
033
034 import java.util.Set;
035 import org.opengis.geometry.DirectPosition;
036 import org.opengis.geometry.primitive.Surface;
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 * A coverage whose domain consists of a collection of {@linkplain Surface surfaces}. In most cases,
045 * the surfaces that constitute the domain of a coverage are mutually exclusive and exhaustively
046 * partition the extent of the coverage. Surfaces or their boundaries may be of any shape. The
047 * boundaries of component surfaces often correspond to natural phenomena and are highly irregular.
048 * <p>
049 * <b>Example:</b> A coverage that represents soil types typically has a spatial domain
050 * composed of surfaces with irregular boundaries.
051 * <p>
052 * Any set of polygons can be used as a spatial domain for a discrete surface coverage. Spatial
053 * domains composed of congruent polygons are very common. Very often, these domains are composed
054 * of congruent rectangles or regular hexagons. The geometry of such a tessellation may be
055 * described in terms of a quadrilateral grid or a hexagonal grid. The spatial domain of a
056 * discrete surface coverage may also consist of the triangles that compose a TIN, or the
057 * polygons of a Thiessen polygon network.
058 *
059 * @version ISO 19123:2004
060 * @author Alessio Fabiani
061 * @author Martin Desruisseaux (IRD)
062 * @since GeoAPI 2.1
063 *
064 * @todo evaluate and evaluateInverse
065 */
066 @UML(identifier="CV_DiscreteSurfaceCoverage", specification=ISO_19123)
067 public interface DiscreteSurfaceCoverage extends DiscreteCoverage {
068 /**
069 * Returns the TIN coverage associated to this surface coverage, or {@code null} if none.
070 * The following constraint must hold:
071 * <p>
072 * <code>{@linkplain #getElements element}.{@linkplain SurfaceValuePair#getGeometry geometry}
073 * == triangleSource.{@linkplain ValueTriangle#getControlValues controlValue}.{@link
074 * ValueObject#getGeometry geometry}</code>
075 *
076 * @return The TIN coverage.
077 *
078 * @todo Review the constraints. Something must be missing...
079 */
080 @UML(identifier="triangleSource", obligation=OPTIONAL, specification=ISO_19123)
081 TinCoverage getTriangleSource();
082
083 /**
084 * Returns the Thiessen polygon coverage associated to this surface coverage,
085 * or {@code null} if none. The following constraint must hold:
086 * <p>
087 * <code>{@linkplain #getElements element}.{@linkplain SurfaceValuePair#getGeometry geometry}
088 * == polygonSource.controlValue.{@link ValueObject#getGeometry geometry}</code>
089 *
090 * @return The thiessen polygon coverage.
091 *
092 * @todo Review the constraints. Something must be missing...
093 */
094 @UML(identifier="polygonSource", obligation=OPTIONAL, specification=ISO_19123)
095 ThiessenPolygonCoverage getPolygonSource();
096
097 /**
098 * Returns the set of <var>surface</var>-<var>value</var> pairs included in this coverage.
099 */
100 @UML(identifier="element", obligation=OPTIONAL, specification=ISO_19123)
101 Set<SurfaceValuePair> getElements();
102
103 /**
104 * Returns the set of <var>surface</var>-<var>value</var> pairs that include the
105 * {@linkplain DomainObject domain objects} containing the specified direct position.
106 */
107 @UML(identifier="locate", obligation=OPTIONAL, specification=ISO_19123)
108 Set<SurfaceValuePair> locate(DirectPosition p);
109
110 /**
111 * Returns the dictionary of <var>surface</var>-<var>value</var> pairs that contain the
112 * {@linkplain DomainObject objects} in the domain of the coverage each paired with its
113 * record of feature attribute values.
114 */
115 @UML(identifier="list", obligation=MANDATORY, specification=ISO_19123)
116 Set<SurfaceValuePair> list();
117
118 /**
119 * Returns the nearest <var>curve</var>-<var>value</var> pair from the specified direct
120 * position. This is a shortcut for <code>{@linkplain #find(DirectPosition,int) find}(p,1)</code>.
121 */
122 @UML(identifier="find", obligation=MANDATORY, specification=ISO_19123)
123 SurfaceValuePair find(DirectPosition p);
124 }