Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_geometries / src / org / gvsig / fmap / geom / primitive / Envelope.java @ 23460

History | View | Annotate | Download (3.9 KB)

1

    
2
/* gvSIG. Geographic Information System of the Valencian Government
3
*
4
* Copyright (C) 2007-2008 Infrastructures and Transports Department
5
* of the Valencian Government (CIT)
6
*
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 2
10
* of the License, or (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
* MA  02110-1301, USA.
21
*
22
*/
23

    
24
/*
25
* AUTHORS (In addition to CIT):
26
* ${year} IVER T.I. S.A.   {{Task}}
27
*/
28

    
29
/* gvSIG. Geographic Information System of the Valencian Government
30
*
31
* Copyright (C) 2007-2008 Infrastructures and Transports Department
32
* of the Valencian Government (CIT)
33
*
34
* This program is free software; you can redistribute it and/or
35
* modify it under the terms of the GNU General Public License
36
* as published by the Free Software Foundation; either version 2
37
* of the License, or (at your option) any later version.
38
*
39
* This program is distributed in the hope that it will be useful,
40
* but WITHOUT ANY WARRANTY; without even the implied warranty of
41
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
42
* GNU General Public License for more details.
43
*
44
* You should have received a copy of the GNU General Public License
45
* along with this program; if not, write to the Free Software
46
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
47
* MA  02110-1301, USA.
48
*
49
*/
50
/*
51
* AUTHORS (In addition to CIT):
52
* ${year} IVER T.I. S.A.   {{Task}}
53
*/
54
package org.gvsig.fmap.geom.primitive;
55

    
56
import org.gvsig.fmap.geom.Geometry;
57

    
58

    
59

    
60
/**
61
 * A minimum bounding box or rectangle. Regardless of dimension, an Envelope
62
 * can be represented without ambiguity as two direct positions (coordinate
63
 * points). To encode an Envelope, it is sufficient to encode these two
64
 * points. This is consistent with all of the data types in this
65
 * specification, their state is represented by their publicly accessible
66
 * attributes.
67
 */
68
public interface Envelope {
69
    /**
70
     * Returns the center ordinate along the specified dimension.
71
     *
72
     * @param dimension DOCUMENT ME!
73
     *
74
     * @return DOCUMENT ME!
75
     */
76
    double getCenter(int dimension);
77

    
78
    /**
79
     * The length of coordinate sequence (the number of entries) in this
80
     * envelope.
81
     *
82
     * @return DOCUMENT ME!
83
     */
84
    int getDimension();
85

    
86
    /**
87
     * Returns the envelope length along the specified dimension.
88
     *
89
     * @param dimension
90
     *
91
     * @return
92
     */
93
    double getLength(int dimension);
94

    
95
    /**
96
     * A coordinate position consisting of all the minimal ordinates for each
97
     * dimension for all points within the Envelope.
98
     *
99
     * @return
100
     */
101
    double[] getLowerCorner();
102

    
103
    /**
104
     * Returns the maximal ordinate along the specified dimension.
105
     *
106
     * @param dimension
107
     *
108
     * @return
109
     */
110
    double getMaximum(int dimension);
111

    
112
    /**
113
     * Returns the minimal ordinate along the specified dimension.
114
     *
115
     * @param dimension
116
     *
117
     * @return
118
     */
119
    double getMinimum(int dimension);
120

    
121
    /**
122
     * A coordinate position consisting of all the maximal ordinates for each
123
     * dimension for all points within the Envelope.
124
     *
125
     * @return
126
     */
127
    double[] getUpperCorner();
128

    
129
        void add(Envelope boundsShp);
130

    
131
        Geometry getGeometry();
132

    
133
        boolean contains(Envelope envelope);
134

    
135
        boolean intersects(Envelope envelope);
136
}