svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.geometry / org.gvsig.fmap.geometry.api / src / main / java / org / gvsig / fmap / geom / complex / Complex.java @ 45940
History | View | Annotate | Download (3.06 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 3
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
|
25 |
package org.gvsig.fmap.geom.complex; |
26 |
|
27 |
import java.util.Collection; |
28 |
import java.util.Iterator; |
29 |
import java.util.function.Predicate; |
30 |
import org.gvsig.fmap.geom.Geometry; |
31 |
import org.gvsig.fmap.geom.aggregate.Aggregate; |
32 |
import org.gvsig.fmap.geom.exception.CreateGeometryException; |
33 |
import org.gvsig.fmap.geom.primitive.Point; |
34 |
import org.gvsig.fmap.geom.primitive.Primitive; |
35 |
import org.gvsig.tools.util.IsEmpty; |
36 |
|
37 |
/**
|
38 |
* <p>
|
39 |
* This interface is equivalent to the GM_Complex specified in
|
40 |
* <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>.
|
41 |
* A Complex is a collection of geometrically disjoint, simple {@link Primitive}'s.
|
42 |
* If a {@link Primitive} (other than a {@link Point}) is in a particular Complex,
|
43 |
* then there exists a set of primitives of lower dimension in the same complex
|
44 |
* that form the boundary of this primitive.
|
45 |
* </p>
|
46 |
* @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>
|
47 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
|
48 |
*/
|
49 |
public interface Complex extends Geometry, Iterable<Geometry>, IsEmpty { |
50 |
|
51 |
/**
|
52 |
* Returns the number of {@link Primitive}'s that composes this multi
|
53 |
* geometry.
|
54 |
*
|
55 |
* @return the number of {@link Primitive}'s that composes this multi
|
56 |
* geometry.
|
57 |
*/
|
58 |
public int getPrimitivesNumber(); |
59 |
|
60 |
/**
|
61 |
* Returns one of the {@link Primitive}'s that is in a concrete position.
|
62 |
*
|
63 |
* @param i Geometry position.
|
64 |
* @return A simple geometry.
|
65 |
*/
|
66 |
public Primitive getPrimitiveAt(int i); |
67 |
|
68 |
/**
|
69 |
* Adds a new primitive to the primitive
|
70 |
*
|
71 |
* @param primitive The primitive to add
|
72 |
*/
|
73 |
public void addPrimitive(Primitive primitive); |
74 |
|
75 |
public void addPrimitives(Aggregate aggregate); |
76 |
|
77 |
public void addPrimitives(Geometry geometry); |
78 |
|
79 |
public void ensureCapacity(int capacity); |
80 |
|
81 |
public Collection<? extends Geometry> getElements(); |
82 |
|
83 |
public Iterator<Geometry> iterator(Predicate<Geometry> filter); |
84 |
|
85 |
public Aggregate createAggregate(int type, Predicate<Geometry> filter) throws CreateGeometryException; |
86 |
|
87 |
} |