001    /*
002     *    GeoAPI - Java interfaces for OGC/ISO standards
003     *    http://www.geoapi.org
004     *
005     *    Copyright (C) 2005-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.coverage.grid;
033    
034    import java.util.List;
035    import java.util.Set;
036    import org.opengis.referencing.crs.CoordinateReferenceSystem;
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     * Contains the geometric characteristics of a qualdrilateral grid. A grid is a network composed
045     * of two or more sets of curves in which members of each set intersect the members of other sets
046     * in a systematic way. The curves are called <cite>grid lines</cite>; the points at which they
047     * intersect are <cite>grid points</cite>; the interstices between the grid lines are called
048     * <cite>grid cells</cite>.
049     * <p>
050     * {@code Grid} has three subclasses, which lie in two partitions. The Positioning partition includes
051     * {@link RectifiedGrid} and {@link ReferenceableGrid}, which contain information that relates the grid
052     * coordinates to an external {@linkplain CoordinateReferenceSystem coordinate reference system}. The
053     * Valuation partition includes {@link GridValuesMatrix}, which contains information for assigning
054     * values from the range to each of the grid points.
055     * <p>
056     * {@code Grid} is not an abstract class: an instance of {@code Grid} need not be an instance of any
057     * of its subclasses. The partitions indicate that an instance of the subclass {@link GridValuesMatrix}
058     * may be, at the same time, an instance of either the subclass {@link RectifiedGrid} or of the subclass
059     * {@link ReferenceableGrid}.
060     *
061     * @version ISO 19123:2004
062     * @author  Martin Schouwenburg
063     * @author  Wim Koolhoven
064     * @author  Martin Desruisseaux (IRD)
065     * @since   GeoAPI 2.1
066     */
067    @UML(identifier="CV_Grid", specification=ISO_19123)
068    public interface Grid {
069        /**
070         * Returns the dimensionality of the grid. The dimensionality is the number
071         * of definining curve sets that constitute the grid.
072         *
073         * @return The dimensionality of the grid.
074         */
075        @UML(identifier="dimension", obligation=MANDATORY, specification=ISO_19123)
076        int getDimension();
077    
078        /**
079         * Returns a list containing the names of the grid axes. Each name is
080         * linked to one of the defining curve sets that constitute the grid.
081         *
082         * @return The names of the grid axes.
083         */
084        @UML(identifier="axisNames", obligation=MANDATORY, specification=ISO_19123)
085        List<String> getAxisNames();
086    
087        /**
088         * Returns the limits of a section of the grid. The envelope contains the low
089         * and high coordinates of the minimal envelope that can contain the grid.
090         *
091         * @return The limits of a section of the grid.
092         */
093        @UML(identifier="extent", obligation=OPTIONAL, specification=ISO_19123)
094        GridEnvelope getExtent();
095    
096        /**
097         * Returns the set of {@linkplain GridPoint grid points} that are located at the
098         * intersections of the grid lines. The collection contains one or more grid points.
099         *
100         * @return The intersections of the grid lines.
101         *
102         * @see GridPoint#getFramework
103         */
104        @UML(identifier="intersection", obligation=MANDATORY, specification=ISO_19123)
105        Set<GridPoint> getIntersections();
106    
107        /**
108         * Returns the set of {@linkplain GridCell grid cells} delineated by the grid lines.
109         * The collection contains one or more grid cells.
110         *
111         * @return The grid cells delineated by the grid lines.
112         *
113         * @see GridCell#getFramework
114         */
115        @UML(identifier="cell", obligation=MANDATORY, specification=ISO_19123)
116        Set<GridCell> getCells();
117    }