Revision 2308 org.gvsig.raster/branches/org.gvsig.raster_dataaccess_refactoring/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/store/DefaultRasterStore.java
DefaultRasterStore.java | ||
---|---|---|
608 | 608 |
|
609 | 609 |
public void goTo(int position) throws OperationNotSupportedException { |
610 | 610 |
if(!isTimeSupportedByTheProvider()) |
611 |
throw new OperationNotSupportedException("Not supported for a MultiRasterDataset");
|
|
611 |
throw new OperationNotSupportedException("Not supported for a RasterDataset"); |
|
612 | 612 |
if(getParameters() instanceof MultiDimensionalStoreParameters) { |
613 | 613 |
((MultiDimensionalStoreParameters)getParameters()).goTo(position); |
614 | 614 |
} |
... | ... | |
616 | 616 |
|
617 | 617 |
public void selectNext() throws OperationNotSupportedException { |
618 | 618 |
if(!isTimeSupportedByTheProvider()) |
619 |
throw new OperationNotSupportedException("Not supported for a MultiRasterDataset");
|
|
619 |
throw new OperationNotSupportedException("Not supported for a RasterDataset"); |
|
620 | 620 |
if(getParameters() instanceof MultiDimensionalStoreParameters) { |
621 | 621 |
((MultiDimensionalStoreParameters)getParameters()).selectNextInstant(); |
622 | 622 |
} |
... | ... | |
624 | 624 |
|
625 | 625 |
public void selectPrev() throws OperationNotSupportedException { |
626 | 626 |
if(!isTimeSupportedByTheProvider()) |
627 |
throw new OperationNotSupportedException("Not supported for a MultiRasterDataset");
|
|
627 |
throw new OperationNotSupportedException("Not supported for a RasterDataset"); |
|
628 | 628 |
if(getParameters() instanceof MultiDimensionalStoreParameters) { |
629 | 629 |
((MultiDimensionalStoreParameters)getParameters()).selectPrevInstant(); |
630 | 630 |
} |
... | ... | |
632 | 632 |
|
633 | 633 |
public void setTime(Time time) throws TimeException, OperationNotSupportedException { |
634 | 634 |
if(!isTimeSupportedByTheProvider()) |
635 |
throw new OperationNotSupportedException("Not supported for a MultiRasterDataset");
|
|
635 |
throw new OperationNotSupportedException("Not supported for a RasterDataset"); |
|
636 | 636 |
|
637 | 637 |
} |
638 | 638 |
|
... | ... | |
718 | 718 |
} |
719 | 719 |
return null; |
720 | 720 |
} |
721 |
|
|
722 |
public RasterDataStore newNotTiledDataStore() { |
|
723 |
if(provider != null) { |
|
724 |
RasterManager manager = (DefaultRasterManager)RasterLocator.getManager(); |
|
725 |
RasterDataStore newDataStore = null; |
|
726 |
try { |
|
727 |
DataStoreParameters newParams = (DataStoreParameters)parameters; |
|
728 |
if(this.isTiled()) { |
|
729 |
newParams = ((TiledRasterProvider)getProvider()).getInternalProvider().getDataParameters(); |
|
730 |
} |
|
731 |
|
|
732 |
newDataStore = manager.getProviderServices().open(newParams); |
|
733 |
if(newDataStore instanceof DefaultRasterStore) { |
|
734 |
((DefaultRasterStore)newDataStore).setStatistics(getStatistics()); |
|
735 |
} |
|
736 |
return newDataStore; |
|
737 |
} catch (NotSupportedExtensionException e) { |
|
738 |
return null; |
|
739 |
} catch (RasterDriverException e) { |
|
740 |
return null; |
|
741 |
} catch (RmfSerializerException e) { |
|
742 |
return newDataStore; |
|
743 |
} |
|
744 |
} |
|
745 |
return null; |
|
746 |
} |
|
721 | 747 |
|
722 | 748 |
public String[] getURIByProvider() { |
723 | 749 |
return provider.getURIByProvider(); |
... | ... | |
892 | 918 |
if(rois == null) { |
893 | 919 |
try { |
894 | 920 |
List<File> fileList = getDataStore().getROIFileListFromRmf(); |
895 |
if(fileList != null & fileList.size() > 0 && fileList.get(0) != null) { |
|
921 |
if(fileList != null && fileList.size() > 0 && fileList.get(0) != null) {
|
|
896 | 922 |
File f = fileList.get(0); |
897 | 923 |
IProjection proj = getProjection(); |
898 | 924 |
if(proj == null) { |
... | ... | |
951 | 977 |
int[] rb = getRender().getRenderBands(); //Evitamos que las bandas que fueron cargadas se machaquen ahora |
952 | 978 |
getRender().setDataStore(this); |
953 | 979 |
getRender().setRenderBands(rb); |
954 |
if(getRender().getLastTransparency() != null)
|
|
955 |
getRender().getLastTransparency().setNoData(getNoDataValue());
|
|
980 |
if(getRender().getRenderingTransparency() != null)
|
|
981 |
getRender().getRenderingTransparency().setNoData(getNoDataValue());
|
|
956 | 982 |
|
957 | 983 |
loadFiltersFromProject(state); |
958 | 984 |
|
... | ... | |
961 | 987 |
@SuppressWarnings("unchecked") |
962 | 988 |
private void loadFiltersFromProject(PersistentState state) throws PersistenceException { |
963 | 989 |
RasterFilterList fList = (RasterFilterList)state.get("filterList"); |
964 |
fList.addEnvParam("IStatistics", getStatistics()); |
|
965 |
fList.addEnvParam("MultiRasterDataset", this); |
|
990 |
fList.addEnvParam("SrcStatistics", getStatistics()); |
|
966 | 991 |
getRender().setFilterList(fList); |
967 | 992 |
|
968 | 993 |
List<PersistencyFilterParam> listFilterUsed = state.getList("paramlist"); |
Also available in: Unified diff