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 / NoData.java @ 5439

History | View | Annotate | Download (4.38 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
/**
27
 * @author fdiaz
28
 *
29
 */
30
public interface NoData {
31

    
32
    /**
33
     * Gets a unique value for nodata. It doesn't take into account if the raster has
34
     * several bands. Returns the same value for all of them.
35
     * @return the noData
36
     */
37
    public Number getValue();
38

    
39
    /**
40
     * Sets a unique value for nodata. It doesn't take into account if the raster has
41
     * several bands. Assigns the same value for all of them.
42
     * @param noData the noData to set
43
     */
44
    public void setValue(Number noData);
45

    
46
    /**
47
     * Returns true if getValue is defined and false if is null
48
     * @return true if getValue is defined and false if is null
49
     */
50
    public boolean isDefined();
51

    
52
    /**
53
     * NoData value persistence. Saves the nodata value in the rmf.
54
     */
55
    public void save();
56

    
57
    /**
58
     * Loads this class from the rmf.
59
     */
60
    public void load();
61

    
62
    /**
63
     * Deletes the nodata value.
64
     */
65
    public void delete();
66

    
67
    /**
68
     * Restores native value. The native is the original value
69
     * saved in the head of the file or its metadata. This value
70
     * has to be assign when NoData object is initialize.
71
     */
72
    public void restore();
73

    
74
    /**
75
     * The native is the original value
76
     * saved in the head of the file or its metadata. This value
77
     * has to be assign when NoData object is initialize
78
     * @return the noData
79
     */
80
    public Number getNativeValue();
81

    
82
    /**
83
     * The native is the original value
84
     * saved in the head of the file or its metadata. This value
85
     * has to be assign when NoData object is initialize.
86
     * @param nativeNoDataValue
87
     */
88
    public void setNativeValue(Number nativeNoDataValue);
89

    
90
    /**
91
     * Sets the file name
92
     * @param fileName
93
     * @param bandCount
94
     */
95
    public void setFileName(String fileName);
96

    
97
    /**
98
     * Flag to renderize nodata values as transparent
99
     * @return true if renderize nodata values as transparent
100
     */
101
    public boolean isNoDataTransparent();
102

    
103
    /**
104
     * Flag to renderize nodata values as transparent
105
     * @param noDataAsTransparent
106
     */
107
    public void setNoDataTransparent(boolean noDataAsTransparent);
108

    
109
    /**
110
     * Gets the NoData data type
111
     * @return the data type
112
     */
113
    public int getDataType();
114

    
115
    /**
116
     * Sets the datatype
117
     * @param datatype
118
     */
119
    public void setDataType(int datatype);
120

    
121
    //FIXME: ?Esto no ser?a sobreescribir el m?todo equals?
122
//    /**
123
//     * Compares two NoData objects an returns true if contains the same values
124
//     * @param noData
125
//     * @return
126
//     */
127
//    public boolean compare(NoData noData);
128

    
129

    
130
    //FIXME: ?Es necesario?
131
//    /**
132
//     * Creates and returns a copy of this object.
133
//     * @return
134
//     */
135
//    public Object clone();
136

    
137

    
138
    //FIXME: De aqu? para abajo ?Deber?a ir fuera?
139

    
140
//    //***********************************************
141
//    //Only for file with more than one band
142
//
143
//    /**
144
//     * Gets the nodata value by band
145
//     * @param nBand
146
//     * @return
147
//     */
148
//    public Number getValueByBand(int nBand);
149
//
150
//    /**
151
//     * Gets the number of bands
152
//     * @return
153
//     */
154
//    public int getBandCount();
155
//
156
//    /**
157
//     * Sets the number of bands
158
//     * @param bandCount
159
//     */
160
//    public void setBandCount(int bandCount);
161
//
162
//    /**
163
//     * Assigns one value in a band
164
//     * @param noDataValue
165
//     */
166
//    public void setValueByBand(Number noDataValue, int nBand);
167

    
168
}