Statistics
| Revision:

gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.api / src / main / java / org / gvsig / fmap / dal / coverage / BufferFactory.java @ 1856

History | View | Annotate | Download (1.99 KB)

1
package org.gvsig.fmap.dal.coverage;
2

    
3
import java.io.IOException;
4

    
5
import org.gvsig.fmap.dal.coverage.dataset.Buffer;
6
import org.gvsig.fmap.dal.coverage.dataset.BufferParam;
7
import org.gvsig.fmap.dal.coverage.datastruct.BandList;
8
import org.gvsig.fmap.dal.coverage.exception.BufferCreationException;
9
import org.gvsig.fmap.dal.coverage.store.RasterDataStore;
10

    
11

    
12
/**
13
 * Factory for raster buffers
14
 * @author Nacho Brodin (nachobrodin@gmail.com)
15
 */
16
public interface BufferFactory {
17

    
18
        /**
19
         * Creates a parameter object for building a buffer. The buffer type is read-write.
20
         * This type could be changed after the creation of a {@link BufferParam} object.
21
         * The buffer will be cached if it's necessary
22
         * @param  w
23
         *         Width
24
         * @param  h
25
         *         Height
26
         * @param  bandCount
27
         *                    Number of bands
28
         * @param  dataType
29
         *         Type of data        
30
         */
31
        public BufferParam createBufferParams(
32
                        int w, 
33
                        int h, 
34
                        int bandCount, 
35
                        int dataType, 
36
                        boolean malloc);
37
        
38
        /**
39
         * Creates a parameter object for building a buffer. The buffer type is read-write.
40
         * This type could be changed after the creation of a {@link BufferParam} object.
41
         * The buffer will be stored in memory.
42
         * @param  w
43
         *         Width
44
         * @param  h
45
         *         Height
46
         * @param  bandCount
47
         *                    Number of bands
48
         * @param  dataType
49
         *         Type of data        
50
         */
51
        public BufferParam createMemoryBufferParams(
52
                        int w, 
53
                        int h, 
54
                        int bandCount, 
55
                        int dataType, 
56
                        boolean malloc);
57
        
58
        /**
59
         * Creates a parameter object for building a buffer. For this call the buffer type 
60
         * is read-only. 
61
         * @return {@link BufferParam}
62
         * @throws IOException 
63
         */
64
        public BufferParam createReadOnlyBufferParams(
65
                        RasterDataStore store,
66
                        int minx,
67
                        int miny,
68
                        int maxx,
69
                        int maxy,
70
                        BandList bandList);
71
        
72
        /**
73
         * Creates a buffer with the selected parameters
74
         * @param param
75
         * @return
76
         * @throws BufferCreationException 
77
         */
78
        public Buffer createBuffer(BufferParam param) throws BufferCreationException;
79
        
80
}