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 / BufferManager.java @ 5453

History | View | Annotate | Download (2.87 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
import java.awt.image.DataBuffer;
26
import java.io.File;
27

    
28
import org.cresques.cts.IProjection;
29

    
30
import org.gvsig.raster.lib.buffer.api.exceptions.BandException;
31

    
32

    
33

    
34
/**
35
 * @author fdiaz
36
 *
37
 */
38
public interface BufferManager {
39

    
40
    public final static int TYPE_UNDEFINED                 = DataBuffer.TYPE_UNDEFINED;
41
    public final static int TYPE_BYTE                      = DataBuffer.TYPE_BYTE;
42
    public final static int TYPE_SHORT                     = DataBuffer.TYPE_SHORT;
43
    public final static int TYPE_USHORT                    = DataBuffer.TYPE_USHORT;
44
    public final static int TYPE_INT                       = DataBuffer.TYPE_INT;
45
    public final static int TYPE_FLOAT                     = DataBuffer.TYPE_FLOAT;
46
    public final static int TYPE_DOUBLE                    = DataBuffer.TYPE_DOUBLE;
47

    
48
    /**
49
     * Creates a NoData object.
50
     * @param value
51
     * @param defaultValue
52
     *
53
     * @return NoData
54
     */
55
    public NoData createNoData(Number value, Number defaultValue);
56

    
57
    /**
58
     * Creates a Band.
59
     * If pageManager is null, the band will be in memory,
60
     * else, the band will be paginated.
61
     *
62
     * @param dataType
63
     * @param rows
64
     * @param columns
65
     * @param noData
66
     * @param pageManager
67
     * @return Band
68
     * @throws BandException
69
     */
70
    public Band createBand(int dataType, int rows, int columns, NoData noData, BandPageManager pageManager) throws BandException;
71

    
72
    /**
73
     * @param rows
74
     * @param columns
75
     * @param bandDataTypes
76
     * @param pageManager
77
     * @return Buffer
78
     */
79
    public Buffer createBuffer(int rows, int columns, int[] bandDataTypes, IProjection projection, BandPageManager pageManager);
80

    
81

    
82
    /**
83
     * @param file
84
     * @param rows
85
     * @param columns
86
     * @param dataType
87
     * @return BandPageManager
88
     */
89
    public BandPageManager createSimpleBandPageManager(File file, int rows, int columns, int dataType);
90

    
91

    
92
}