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 @ 5446

History | View | Annotate | Download (5.41 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 the number of columns
70
     */
71
    public int getColumns();
72

    
73
    /**
74
     * @return the number of rows
75
     */
76
    public int getRows();
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
     * Returns true if passed as parameter cell is inside of the buffer, else returns false.
90
     *
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
     * Returns true if passed as parameter point is inside of the buffer, else returns false.
99
     *
100
     * @param point
101
     * @return true if point is inside of this
102
     */
103
    public boolean isInside(Point point);
104

    
105

    
106
    /**
107
     * Adds a band
108
     *
109
     * @param band
110
     */
111
    public void addBand(Band band);
112

    
113
    /**
114
     * Sets a band in the "pos" position
115
     *
116
     * @param pos
117
     * @param band
118
     */
119
    public void setBand(int pos, Band band);
120

    
121
    /**
122
     * Removes the band in the "pos" position
123
     *
124
     * @param pos
125
     */
126
    public void removeBand(int pos);
127

    
128
    /**
129
     * Gets the band in the "pos" position
130
     *
131
     * @param pos
132
     * @return return the band in the "pos" position
133
     */
134
    public Band getBand(int pos);
135

    
136
    /**
137
     *
138
     * @param pos
139
     * @return return the band in the "pos" position if the band is of type byte
140
     */
141
    public BandByte getBandByte(int pos);
142

    
143
    /**
144
     * @param pos
145
     * @return return the band in the "pos" position if the band is of type short
146
     */
147
    public BandShort getBandShort(int pos);
148

    
149
    /**
150
     * @param pos
151
     * @return return the band in the"pos" position if the band is of type int
152
     */
153
    public BandInt getBandInt(int pos);
154

    
155
    /**
156
     * @param pos
157
     * @return return the band in the "pos" position if the band is of type float
158
     */
159
    public BandFloat getBandFloat(int pos);
160

    
161
    /**
162
     * @param pos
163
     * @return return the band in the "pos" position if the band is of type double
164
     */
165
    public BandDouble getBandDouble(int pos);
166

    
167
    /**
168
     * Switches the bands as indicated by the parameter
169
     *
170
     * @param positions
171
     */
172
    public void switchBands(int[] positions);
173

    
174
    /**
175
     * Switches two bands
176
     *
177
     * @param pos1
178
     * @param pos2
179
     */
180
    public void switchBands(int pos1, int pos2);
181

    
182
    /**
183
     * Creates a interpolated buffer
184
     *
185
     * @param rows
186
     * @param columns
187
     * @param interpolationMode
188
     * @param status
189
     * @return a interpolated Buffer according the interpolation mode
190
     */
191
    public Buffer createInterpolated(int rows, int columns, int interpolationMode, SimpleTaskStatus status);
192

    
193
    /**
194
     * Converts buffer using specified coordinate transformation
195
     *
196
     * @param ct
197
     *            Coordinate transformation to convert buffer
198
     * @param status
199
     * @return New converted buffer.
200
     */
201
    public Buffer convert(ICoordTrans ct, SimpleTaskStatus status);
202

    
203
    /**
204
     *
205
     * @return true if is paginated
206
     */
207
    public boolean isPaginated();
208

    
209
}