Revision 859 org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.api/src/main/java/org/gvsig/fmap/dal/coverage/grid/AbstractROI.java
AbstractROI.java | ||
---|---|---|
158 | 158 |
if (isInGrid(xOffset+x, yOffset+y)) |
159 | 159 |
return grid.getCellValueAsByte(xOffset+x, yOffset+y); |
160 | 160 |
else |
161 |
return (byte) grid.getNoDataValue();
|
|
161 |
return grid.getNoDataValue().getValue().byteValue();
|
|
162 | 162 |
} |
163 | 163 |
|
164 | 164 |
/** |
... | ... | |
175 | 175 |
if (isInGrid(xOffset+x, yOffset+y)) |
176 | 176 |
return grid.getCellValueAsDouble(xOffset+x, yOffset+y); |
177 | 177 |
else |
178 |
return grid.getNoDataValue(); |
|
178 |
return grid.getNoDataValue().getValue().doubleValue();
|
|
179 | 179 |
} |
180 | 180 |
|
181 | 181 |
/** |
... | ... | |
192 | 192 |
if (isInGrid(xOffset+x, yOffset+y)) |
193 | 193 |
return grid.getCellValueAsFloat(xOffset+x, yOffset+y); |
194 | 194 |
else |
195 |
return (float) grid.getNoDataValue();
|
|
195 |
return grid.getNoDataValue().getValue().floatValue();
|
|
196 | 196 |
} |
197 | 197 |
|
198 | 198 |
/** |
... | ... | |
209 | 209 |
if (isInGrid(xOffset+x, yOffset+y)) |
210 | 210 |
return grid.getCellValueAsInt(xOffset+x, yOffset+y); |
211 | 211 |
else |
212 |
return (int) grid.getNoDataValue();
|
|
212 |
return grid.getNoDataValue().getValue().intValue();
|
|
213 | 213 |
} |
214 | 214 |
|
215 | 215 |
/** |
... | ... | |
226 | 226 |
if (isInGrid(xOffset+x, yOffset+y)) |
227 | 227 |
return grid.getCellValueAsShort(xOffset+x, yOffset+y); |
228 | 228 |
else |
229 |
return (short) grid.getNoDataValue();
|
|
229 |
return grid.getNoDataValue().getValue().shortValue();
|
|
230 | 230 |
} |
231 | 231 |
|
232 | 232 |
public int getDirToNextDownslopeCell(int x, int y) throws GridException { |
... | ... | |
337 | 337 |
|
338 | 338 |
public double getNoDataValue() { |
339 | 339 |
// TODO Ver si usar un nodatavalue especifico del roi. |
340 |
return grid.getNoDataValue(); |
|
340 |
return grid.getNoDataValue().getValue().doubleValue();
|
|
341 | 341 |
} |
342 | 342 |
|
343 | 343 |
public double getSlope(int x, int y) throws GridException { |
Also available in: Unified diff