Revision 21345 trunk/libraries/libRaster/src/org/gvsig/raster/dataset/GeoRasterWriter.java
GeoRasterWriter.java | ||
---|---|---|
393 | 393 |
* @return true si est? soportada y false si no lo est? |
394 | 394 |
*/ |
395 | 395 |
public boolean isSupportedThisExtension(String ext, int dataType, int bands) { |
396 |
WriteFileFormatFeatures features = (WriteFileFormatFeatures)fileFeature.get(ext); |
|
397 |
if(features == null) |
|
396 |
WriteFileFormatFeatures features = (WriteFileFormatFeatures) fileFeature.get(ext);
|
|
397 |
if (features == null)
|
|
398 | 398 |
return false; |
399 | 399 |
int[] bandsSupported = features.getNBandsSupported(); |
400 | 400 |
for (int i = 0; i < bandsSupported.length; i++) { |
401 |
if(bandsSupported[i] == -1) |
|
401 |
if (bandsSupported[i] == -1)
|
|
402 | 402 |
break; |
403 |
if(bandsSupported[i] == bands)
|
|
403 |
if (bandsSupported[i] >= bands)
|
|
404 | 404 |
break; |
405 | 405 |
return false; |
406 | 406 |
} |
407 | 407 |
int[] dt = features.getDataTypesSupported(); |
408 | 408 |
for (int i = 0; i < dt.length; i++) |
409 |
if(dataType == dt[i]) |
|
409 |
if (dataType == dt[i])
|
|
410 | 410 |
return true; |
411 | 411 |
return false; |
412 | 412 |
} |
413 |
} |
|
413 |
} |
Also available in: Unified diff