Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / libFMap_geometries / src / org / gvsig / fmap / geom / primitive / Envelope.java @ 25163

History | View | Annotate | Download (3.97 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.cresques.cts.ICoordTrans;
57
import org.gvsig.fmap.geom.Geometry;
58

    
59

    
60

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

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

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

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

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

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

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

    
130
        void add(Envelope boundsShp);
131

    
132
        Geometry getGeometry();
133

    
134
        boolean contains(Envelope envelope);
135

    
136
        boolean intersects(Envelope envelope);
137

    
138
        Envelope convert(ICoordTrans trans);
139
}