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 / datastruct / DataStructFactory.java @ 2438

History | View | Annotate | Download (5.25 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
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
*/
22
package org.gvsig.fmap.dal.coverage.datastruct;
23

    
24
import java.awt.geom.Dimension2D;
25
import java.awt.geom.Point2D;
26
import java.awt.geom.Rectangle2D;
27

    
28
import org.cresques.cts.IProjection;
29
import org.gvsig.fmap.dal.coverage.store.RasterDataStore;
30
import org.gvsig.fmap.dal.coverage.store.props.ColorInterpretation;
31
import org.gvsig.fmap.dal.coverage.store.props.Transparency;
32

    
33
/**
34
 * Factory for data structures
35
 * @author Nacho Brodin (nachobrodin@gmail.com)
36
 *
37
 */
38
public interface DataStructFactory {
39

    
40
        /**
41
         * Builds a TransparencyRange object
42
         * @return
43
         */
44
        public TransparencyRange createTransparencyRange();
45
        
46
        /**
47
         * Creates a <code>Transparency</code> object. This object is useful to render
48
         * with transparency information.
49
         * @return
50
         */
51
        public Transparency createTransparency(int nBands);
52
        
53
    /**
54
     * Returns the object which represents the color table library
55
     * @return
56
     */
57
    public ColorTableLibrary getColorTableLibrary();
58
    
59
    /**
60
     * Builds a extent using upper left coordinate and lower right coordinate 
61
     * @param ul        upper left coordinate
62
     * @param lr        lower right coordinate 
63
     */
64
    public Extent createExtent(Point2D ul, Point2D lr);
65
    
66
    /**
67
     * Builds a extent using the four coordinates 
68
     * @param ul upper left coordinate
69
     * @param lr lower right coordinate 
70
     * @param ur upper right coordinate
71
     * @param ll lower left coordinate 
72
     */
73
    public Extent createExtent(Point2D ul, Point2D lr, Point2D ur, Point2D ll);
74

    
75
    /**
76
     * Builds a extent using upper left coordinate and lower right coordinate 
77
     * @param x1 X upper left coordinate
78
     * @param y1 Y upper left coordinate
79
     * @param x2 X lower right coordinate 
80
     * @param y2 Y lower right coordinate 
81
     */
82
    public Extent createExtent(double x1, double y1, double x2, double y2);
83

    
84
    /**
85
     * Builds a extent using a rectangle
86
     * @param r        Rectangle 2D
87
     */
88
    public Extent createExtent(Rectangle2D r);
89
    
90
    /**
91
     * Builds an empty extent
92
     * @return
93
     */
94
    public Extent createExtent();
95
    
96
        /**
97
         * Builds a new NoData object
98
         * @param noData
99
         *        value to assign to all bands
100
         * @param nativeNoData
101
         *        The native is the original value
102
         *        saved in the head of the file or its metadata.
103
         * @param fileName
104
         *        Name of file owner of this nodata value. This string is useful to
105
         *        save the rmf file
106
         * @param bandCount
107
         *        Number of bands of the file
108
         * @return NoData
109
         */
110
        public NoData createNoData(Number noData, Number nativeNoData, String fileName, int bandCount);
111
        
112
        /**
113
         * Builds a new NoData for DEMs
114
         * @param noData
115
         *        value to assign to all bands
116
         * @param nativeNoData
117
         *        The native is the original value
118
         *        saved in the head of the file or its metadata.
119
         * @param fileName
120
         *        Name of file owner of this nodata value. This string is useful to
121
         *        save the rmf file
122
         * @return NoData
123
         */
124
        public NoData createNoData(Number noData, Number nativeNoData, String fileName);
125
        
126
        /**
127
         * Builds a new NoData for DEMs
128
         * @param dataType
129
         *        dataType of this NoData
130
         * @param bandCount
131
         *        Number of bands
132
         * @return NoData
133
         */
134
        public NoData createDefaultNoData(int bandCount, int dataType);
135
        
136
        /**
137
         * Creates a empty DataStore
138
         * @return
139
         */
140
        public RasterDataStore createDataStore();
141
        
142
        /**
143
         * Creates a empty geopoint
144
         * @return
145
         */
146
        public GeoPoint createGeoPoint();
147
        
148
        /**
149
         * Creates a geopoint with values
150
         * @param p
151
         * @param m
152
         * @return
153
         */
154
        public GeoPoint createGeoPoint(Point2D p, Point2D m);
155
        
156
        /**
157
         * Gets a new instance of a ColorInterpretation object
158
         * @param A list of color interpretation strings
159
         * @return
160
         */
161
        public ColorInterpretation createColorInterpretation(String[] colorInterp);
162
        
163
        /**
164
         * Gets a new instance of a ColorInterpretation object
165
         * @param A constant defined in <code>ColorInterpretation</code> interface. 
166
         * It can be RGB, BGR, ARGB, PALETTE or GRAYSCALE 
167
         * @return
168
         */
169
        public ColorInterpretation createColorInterpretation(String colorInterpretationConstant);
170
        
171
         /**
172
     * Builds a new ViewPortData object
173
     * @param proj
174
     * @param extent
175
     * @param size
176
     * @return
177
     */
178
    public ViewPortData createViewPortData(IProjection proj, Extent extent, Dimension2D size);
179
    
180
    /**
181
     * Builds a new ViewPortData object
182
     * @return
183
     */
184
    public ViewPortData createViewPortData();
185
        
186
}