Revision 6327

View differences:

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/BufferManager.java
56 56
     * @return NoData
57 57
     */
58 58
    public NoData createNoData(Number value, Number defaultValue);
59
    
59

  
60 60
    /**
61 61
     * Creates {@link BandInfo} with information about one band.
62
     * @param band 
62
     * 
63
     * @param band
63 64
     *            Band of this {@link BandInfo}
64 65
     * @param name
65 66
     *            Band name
66 67
     * @param description
67 68
     *            Description of band
69
     * @param dataType
70
     *            Data type of band. See {@link BufferManager} to check types.
68 71
     * @param values
69 72
     *            A key-value map with information properties about band
70 73
     * @return BandInfo
71 74
     */
72
    public BandInfo createBandInfo(int band, String name, String description,
75
    public BandInfo createBandInfo(int band, String name, String description, int dataType,
73 76
        List<Map.Entry<Object, Object>> values);
74 77

  
75 78
    /**
......
97 100
     * @see BufferManager#createBandInfo(String, String, List)
98 101
     * @see BufferManager#createSimpleBandPageManager(File, int, int, int)
99 102
     */
100
    public Band createBand(int dataType, int rows, int columns, NoData noData, PageManager pageManager) throws BandException;
103
    public Band createBand(int dataType, int rows, int columns, NoData noData,
104
        PageManager pageManager) throws BandException;
101 105

  
102 106
    /**
103 107
     * Creates a memory buffer.
......
117 121
     * @throws BufferException
118 122
     *             If there is any problem creating buffer.
119 123
     */
120
    Buffer createBuffer(int rows, int columns, int[] bandDataTypes, IProjection projection) throws BufferException;
124
    Buffer createBuffer(int rows, int columns, int[] bandDataTypes, IProjection projection)
125
        throws BufferException;
121 126

  
122 127
    /**
123 128
     * Creates a memory buffer.
......
140 145
     * @throws BufferException
141 146
     *             If there is any problem creating buffer.
142 147
     */
143
    Buffer createBuffer(int rows, int columns, int[] bandDataTypes, NoData[] bandNodata, IProjection projection)
144
        throws BufferException;
148
    Buffer createBuffer(int rows, int columns, int[] bandDataTypes, NoData[] bandNodata,
149
        IProjection projection) throws BufferException;
145 150

  
146 151
    /**
147 152
     * Creates a memory buffer.
......
167 172
     * @throws BufferException
168 173
     *             If there is any problem creating buffer.
169 174
     */
170
    Buffer createBuffer(int rows, int columns, int[] bandDataTypes, NoData[] bandNodata, IProjection projection,
171
        Envelope envelope) throws BufferException;
172
    
175
    Buffer createBuffer(int rows, int columns, int[] bandDataTypes, NoData[] bandNodata,
176
        IProjection projection, Envelope envelope) throws BufferException;
177

  
173 178
    /**
174 179
     * Creates a buffer. Buffer bands will be paginated using
175 180
     * {@link BandPageManager}.
......
223 228
     * @return BandPageManager
224 229
     * @throws IOException
225 230
     */
226
    public PageManager createSimpleBandPageManager(File file, int rows, int columns, int dataType) throws IOException;
231
    public PageManager createSimpleBandPageManager(File file, int rows, int columns, int dataType)
232
        throws IOException;
227 233

  
228 234
    /**
229 235
     *
......
234 240
     * @return A list of page managers
235 241
     * @throws IOException
236 242
     */
237
    public List<PageManager> createSimpleBandPageManagerList(File[] files, int rows, int columns, int[] dataType)
238
        throws IOException;
243
    public List<PageManager> createSimpleBandPageManagerList(File[] files, int rows, int columns,
244
        int[] dataType) throws IOException;
239 245

  
240 246
    /**
241 247
     * @param dataType
......
252 258
     * @param buffer
253 259
     * @param band
254 260
     * @return Band
255
     * @throws BandException 
261
     * @throws BandException
256 262
     */
257 263
    public Band createClippedBand(Buffer buffer, Band band) throws BandException;
258 264

  
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/BandInfo.java
1 1
package org.gvsig.raster.lib.buffer.api;
2

  
2 3
/* gvSIG. Desktop Geographic Information System.
3
*
4
* Copyright ? 2007-2016 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 2
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
*/
4
 *
5
 * Copyright ? 2007-2016 gvSIG Association
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
 * For any additional information, do not hesitate to contact us
23
 * at info AT gvsig.com, or visit our website www.gvsig.com.
24
 */
24 25

  
25 26
import java.util.List;
26 27
import java.util.Map;
......
34 35
 *
35 36
 */
36 37
public interface BandInfo {
37
    
38

  
38 39
    /**
39 40
     * Gets band of this information
40 41
     * 
......
43 44
    public int getBand();
44 45

  
45 46
    /**
47
     * Gets data type of band
48
     * 
49
     * @return Data type of band. See {@link BufferManager} to check data types.
50
     */
51
    public int getDataType();
52

  
53
    /**
46 54
     * Gets name of band
47 55
     * 
48 56
     * @return Band name
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.impl/src/main/java/org/gvsig/raster/lib/buffer/impl/DefaultBandInfo.java
41 41
    private String name;
42 42
    private String description;
43 43
    private List<Map.Entry<Object, Object>> values;
44
    private int dataType;
44 45
    
45 46
    /**
46 47
     * 
47 48
     * @param band 
48 49
     * @param name
49 50
     * @param description
51
     * @param dataType 
50 52
     * @param values
51 53
     */
52
    public DefaultBandInfo(int band, String name, String description,
54
    public DefaultBandInfo(int band, String name, String description, int dataType,
53 55
        List<Entry<Object, Object>> values) {
54 56
        super();
55 57
        this.band = band;
56 58
        this.name = name;
57 59
        this.description = description;
60
        this.dataType = dataType;
58 61
        this.values = values;
59 62
    }
60 63

  
......
77 80
    public int getBand() {
78 81
        return this.band;
79 82
    }
83

  
84
    @Override
85
    public int getDataType() {
86
        return this.dataType;
87
    }
80 88
}
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.impl/src/main/java/org/gvsig/raster/lib/buffer/impl/DefaultBufferManager.java
102 102
    @Override
103 103
    public Buffer createBuffer(int rows, int columns, int[] bandDataTypes, NoData[] bandNoData,
104 104
        IProjection projection) throws CreateBufferException {
105
        return new DefaultBuffer(rows, columns, bandDataTypes, bandNoData, projection, null,
106
            null);
105
        return new DefaultBuffer(rows, columns, bandDataTypes, bandNoData, projection, null, null);
107 106
    }
108 107

  
109 108
    @Override
......
117 116
    public Buffer createBuffer(int rows, int columns, int[] bandDataTypes, NoData[] bandNoData,
118 117
        IProjection projection, Envelope envelope, List<PageManager> pageManagers)
119 118
        throws BufferException {
120
        return new DefaultBuffer(rows, columns, bandDataTypes, bandNoData, projection,
121
            envelope, pageManagers);
119
        return new DefaultBuffer(rows, columns, bandDataTypes, bandNoData, projection, envelope,
120
            pageManagers);
122 121
    }
123 122

  
124 123
    @Override
......
190 189
    }
191 190

  
192 191
    @Override
193
    public BandInfo createBandInfo(int band, String name, String description,
192
    public BandInfo createBandInfo(int band, String name, String description, int dataType,
194 193
        List<Entry<Object, Object>> values) {
195
        return new DefaultBandInfo(band, name, description, values);
194
        return new DefaultBandInfo(band, name, description, dataType, values);
196 195
    }
197 196
}

Also available in: Unified diff