Revision 29454 trunk/libraries/libRaster/src/org/gvsig/raster/dataset/properties/DatasetListStatistics.java
DatasetListStatistics.java | ||
---|---|---|
47 | 47 |
*/ |
48 | 48 |
public static DatasetListStatistics loadDatasetListStatistics(IRasterDataSource datasource) throws RmfSerializerException { |
49 | 49 |
DatasetStatistics[] stats = new DatasetStatistics[datasource.getDatasetCount()]; |
50 |
boolean isCalc = true; |
|
51 | 50 |
for (int i = 0; i < datasource.getDatasetCount(); i++) { |
52 | 51 |
DatasetStatistics statFile = ((RasterDataset) datasource.getDataset(i)[0]).getStatistics(); |
53 | 52 |
stats[i] = (DatasetStatistics)((RasterDataset) datasource.getDataset(i)[0]).loadObjectFromRmf(DatasetStatistics.class, statFile); |
54 | 53 |
|
55 | 54 |
//Con que un dataset no tenga la estadistica calculada se pone a no calculado el DatasetListStatistics |
56 | 55 |
if(!stats[i].isCalculated()) |
57 |
isCalc = false;
|
|
56 |
return null;
|
|
58 | 57 |
} |
59 | 58 |
DatasetListStatistics result = new DatasetListStatistics(stats); |
60 |
result.setCalculated(isCalc);
|
|
59 |
result.setCalculated(true);
|
|
61 | 60 |
return result; |
62 | 61 |
} |
63 | 62 |
|
Also available in: Unified diff