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 org.opengis.annotation.Association;
035    import org.opengis.annotation.UML;
036    
037    import static org.opengis.annotation.Obligation.*;
038    import static org.opengis.annotation.Specification.*;
039    
040    
041    /**
042     * Basis for 3-dimensional geometry. The extent of a solid is
043     * defined by the boundary surfaces.
044     *
045     * @version <A HREF="http://www.opengeospatial.org/standards/as">ISO 19107</A>
046     * @author Martin Desruisseaux (IRD)
047     * @since GeoAPI 1.0
048     *
049     * @see PrimitiveFactory#createSolid
050     *
051     * @todo Some associations are commented out for now.
052     */
053    @UML(identifier="GM_Solid", specification=ISO_19107)
054    public interface Solid extends Primitive {
055        /**
056         * Returns a sequence of sets of {@linkplain Surface surfaces} that limit the extent of this
057         * {@code Solid}. These surfaces shall be organized into one set of surfaces for each
058         * boundary component of this {@code Solid}. Each of these shells shall be a cycle
059         * (closed composite surface without boundary).
060         *
061         * <blockquote><font size=2>
062         * <strong>NOTE:</strong> The exterior shell of a solid is defined only because the embedding
063         * coordinate space is always a 3D Euclidean one. In general, a solid in a bounded 3-dimensional
064         * manifold has no distinguished exterior boundary. In cases where "exterior" boundary is not
065         * well defined, all the shells of the {@linkplain SolidBoundary solid boundary} shall be
066         * listed as "interior".
067         * </font></blockquote>
068         *
069         * The {@linkplain OrientableSurface orientable surfaces} that bound a solid shall be oriented
070         * outward - that is, the "top" of each {@linkplain Surface surface} as defined by its orientation
071         * shall face away from the interior of the solid. Each {@linkplain Shell shell}, when viewed as
072         * a composite surface, shall be a cycle.
073         *
074         * @return The sets of positions on the boundary.
075         */
076        @UML(identifier="boundary", obligation=MANDATORY, specification=ISO_19107)
077        SolidBoundary getBoundary();
078    
079        /**
080         * Returns the sum of the surface areas of all of the boundary components of a solid.
081         *
082         * @return The area of this solid.
083         *
084         * @todo In UML diagram, this operation has an {@code Area} return type.
085         */
086        @UML(identifier="area", obligation=MANDATORY, specification=ISO_19107)
087        double getArea();
088    
089        /**
090         * Returns the volume of this solid. This is the volume interior to the exterior
091         * boundary shell minus the sum of the volumes interior to any interior boundary
092         * shell.
093         *
094         * @return The volume of this solid.
095         *
096         * @todo In UML diagram, this operation has a {@code Volume} return type.
097         */
098        @UML(identifier="volume", obligation=MANDATORY, specification=ISO_19107)
099        double getVolume();
100    
101        /**
102         * Returns always {@code null}, since solids have no proxy.
103         *
104         * @issue http://jira.codehaus.org/browse/GEO-63
105         */
106        @Association("Oriented")
107        @UML(identifier="proxy", obligation=FORBIDDEN, specification=ISO_19107)
108        OrientablePrimitive[] getProxy();
109    
110    //    public org.opengis.geometry.complex.GM_CompositeSolid[] getComposite() { return null; }
111    }