Statistics
| Revision:

gvsig-raster / org.gvsig.raster / branches / org.gvsig.raster.2.4 / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.buffer / org.gvsig.raster.lib.buffer.api / src / main / java / org / gvsig / raster / lib / buffer / api / Buffer.java @ 5441

History | View | Annotate | Download (4.55 KB)

1
/* gvSIG. Desktop Geographic Information System.
2
 *
3
 * Copyright ? 2007-2016 gvSIG Association
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
 * MA  02110-1301, USA.
19
 *
20
 * For any additional information, do not hesitate to contact us
21
 * at info AT gvsig.com, or visit our website www.gvsig.com.
22
 */
23
package org.gvsig.raster.lib.buffer.api;
24

    
25

    
26
import org.cresques.cts.ICoordTrans;
27
import org.cresques.cts.IProjection;
28

    
29
import org.gvsig.fmap.geom.primitive.Envelope;
30
import org.gvsig.fmap.geom.primitive.Point;
31
import org.gvsig.raster.lib.buffer.api.Band.BandByte;
32
import org.gvsig.raster.lib.buffer.api.Band.BandDouble;
33
import org.gvsig.raster.lib.buffer.api.Band.BandFloat;
34
import org.gvsig.raster.lib.buffer.api.Band.BandInt;
35
import org.gvsig.raster.lib.buffer.api.Band.BandShort;
36
import org.gvsig.tools.task.SimpleTaskStatus;
37

    
38
/**
39
 * @author fdiaz
40
 *
41
 */
42
public interface Buffer extends HistogramCapable, StatisticsCapable, Iterable<Band> {
43

    
44
    public final static int INTERPOLATION_Undefined        = 0;
45
    public final static int INTERPOLATION_NearestNeighbour = 1;
46
    public final static int INTERPOLATION_Bilinear         = 2;
47
    public final static int INTERPOLATION_InverseDistance  = 3;
48
    public final static int INTERPOLATION_BicubicSpline    = 4;
49
    public final static int INTERPOLATION_BSpline          = 5;
50

    
51
    /**
52
     * Adds a filter list to buffer
53
     *
54
     * @param filterList
55
     */
56
    public void filter(FilterList filterList);
57

    
58
    /**
59
     * @return Number of buffer bands
60
     */
61
    public int getBandCount();
62

    
63
    /**
64
     * @return Bands of buffer
65
     */
66
    public Band[] getBands();
67

    
68
    /**
69
     * @return Width in pixels of buffer
70
     */
71
    public int getWidth();
72

    
73
    /**
74
     * @return Height in pixels of buffer
75
     */
76
    public int getHeight();
77

    
78
    /**
79
     * @return Envelope of this buffer
80
     */
81
    public Envelope getEnvelope();
82

    
83
    /**
84
     * @return Projection of buffer
85
     */
86
    public IProjection getProjection();
87

    
88
    /**
89
     * Obtiene true si la celda pasada por par?metro cae dentro de los l?mites
90
     * del raster y false si cae fuera.
91
     * @param cellX Posici?n X de la celda a averiguar
92
     * @param cellY Posici?n Y de la celda a averiguar
93
     * @return true si est? dentro y false si cae fuera.
94
     */
95
    public boolean isInside(int cellX, int cellY);
96

    
97
    /**
98
     * @param point
99
     * @return
100
     */
101
    public boolean isInside(Point point);
102

    
103

    
104
    /**
105
     * @param band
106
     */
107
    public void addBand(Band band);
108

    
109
    /**
110
     * @param pos
111
     * @param band
112
     */
113
    public void setBand(int pos, Band band);
114

    
115
    /**
116
     * @param pos
117
     */
118
    public void removeBand(int pos);
119

    
120
    /**
121
     * @param pos
122
     * @return
123
     */
124
    public Band getBand(int pos);
125

    
126
    /**
127
     * @param pos
128
     * @return
129
     */
130
    public BandByte getBandByte(int pos);
131

    
132
    /**
133
     * @param pos
134
     * @return
135
     */
136
    public BandShort getBandShort(int pos);
137

    
138
    /**
139
     * @param pos
140
     * @return
141
     */
142
    public BandInt getBandInt(int pos);
143

    
144
    /**
145
     * @param pos
146
     * @return
147
     */
148
    public BandFloat getBandFloat(int pos);
149

    
150
    /**
151
     * @param pos
152
     * @return
153
     */
154
    public BandDouble getBandDouble(int pos);
155

    
156
    /**
157
     * @param positions
158
     */
159
    public void switchBands(int[] positions);
160

    
161
    /**
162
     * @param pos1
163
     * @param pos2
164
     */
165
    public void switchBands(int pos1, int pos2);
166

    
167
    /**
168
     * @param width
169
     * @param height
170
     * @param interpolationMode
171
     * @param status
172
     * @return
173
     */
174
    public Buffer createInterpolated(int width, int height, int interpolationMode, SimpleTaskStatus status);
175

    
176
    /**
177
     * Converts buffer using specified coordinate transformation
178
     *
179
     * @param ct
180
     *            Coordinate transformation to convert buffer
181
     * @param status
182
     * @return New converted buffer.
183
     */
184
    public Buffer convert(ICoordTrans ct, SimpleTaskStatus status);
185

    
186
    /**
187
     * @return
188
     */
189
    public boolean isPaginated();
190

    
191
}