001 /*
002 * GeoAPI - Java interfaces for OGC/ISO standards
003 * http://www.geoapi.org
004 *
005 * Copyright (C) 2006-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 // This class was created by Sanjay Jena and Prof. Jackson Roehrig in order to complete
033 // missing parts of the GeoAPI and submit the results to GeoAPI afterwards as proposal.
034
035 package org.opengis.geometry.aggregate;
036
037 import java.util.Set;
038 import org.opengis.geometry.primitive.Point;
039 import org.opengis.geometry.primitive.Primitive;
040 import org.opengis.geometry.primitive.OrientableCurve;
041 import org.opengis.geometry.primitive.OrientableSurface;
042
043
044 /**
045 * A factory of {@linkplain Aggregate aggregate} geometric objects.
046 * All aggregates created through this interface will use the
047 * {@linkplain #getCoordinateReferenceSystem factory's coordinate reference system}.
048 * Creating aggregates in a different CRS may requires a different instance of
049 * {@code AggregateFactory}.
050 *
051 * @version <A HREF="http://www.opengeospatial.org/standards/as">ISO 19107</A>
052 * @author Sanjay Jena
053 * @author Prof. Dr. Jackson Roehrig
054 * @since GeoAPI 2.1
055 *
056 * @todo Need to check if ISO 19107 defines constructors for aggregates.
057 */
058 public interface AggregateFactory {
059 /**
060 * Creates a {@linkplain MultiPrimitive multi primitive} by a set of {@linkplain Primitive primitives}.
061 * The created {@code MultiPrimitive} will hold only references to the given primitive,
062 * e.g. changes in the primitive instances will have consequences in the
063 * geometric behaviour of the {@code MultiPrimitive} and vice versa.
064 *
065 * @param points A set of primitives.
066 * @return the resulting multi primitive.
067 */
068 MultiPrimitive createMultiPrimitive(Set<Primitive> primitives);
069
070 /**
071 * Creates a {@linkplain MultiPoint multi point} by a set of {@linkplain Point points}.
072 * The created {@code MultiPoint} will hold only references to the given points,
073 * e.g. changes in the point instances will have consequences in the
074 * geometric behaviour of the {@code MultiPoint} and vice versa.
075 *
076 * @param points A set of points.
077 * @return the resulting multi point.
078 */
079 MultiPoint createMultiPoint(Set<Point> points);
080
081 /**
082 * Creates a {@linkplain MultiCurve multi curve} by a set of {@linkplain Curve curves}.
083 * The created {@code MultiCurve} will hold only references to the given curves,
084 * e.g. changes in the curve instances will have consequences in the
085 * geometric behaviour of the {@code MultiCurve} and vice versa.
086 *
087 * @param curves A set of curves.
088 * @return the resulting multi curve.
089 */
090 MultiCurve createMultiCurve(Set<OrientableCurve> curves);
091
092 /**
093 * Creates a {@linkplain MultiSurface multi surface} by a set of {@linkplain Surface surfaces}.
094 * The created {@code MultiSurface} will hold only references to the given surfaces,
095 * e.g. changes in the surface instances will have consequences in the
096 * geometric behaviour of the {@code MultiSurface} and vice versa.
097 *
098 * @param surfaces A set of surfaces.
099 * @return the resulting multi surface.
100 */
101 MultiSurface createMultiSurface(Set<OrientableSurface> surfaces);
102 }