Revision 13328 trunk/libraries/libRaster/src/org/gvsig/raster/buffer/BufferFactory.java

View differences:

BufferFactory.java
25 25

  
26 26
import org.gvsig.raster.dataset.FileNotFoundInListException;
27 27
import org.gvsig.raster.dataset.IBuffer;
28
import org.gvsig.raster.dataset.IRasterDataSource;
28 29
import org.gvsig.raster.dataset.InvalidSetViewException;
29
import org.gvsig.raster.dataset.MultiRasterDataset;
30 30
import org.gvsig.raster.dataset.NotSupportedExtensionException;
31 31
import org.gvsig.raster.dataset.RasterDataset;
32 32
import org.gvsig.raster.dataset.RasterDriverException;
......
57 57
	public static final int			CANCEL_READ = 1;
58 58
	private boolean[]				cancel = new boolean[1];
59 59

  
60
	private MultiRasterDataset 		mDataset = new MultiRasterDataset(null);
60
	private IRasterDataSource 		mDataset = null;
61 61
	private IBuffer					rasterBuf = null;
62 62
	private int						width = 0;
63 63
	private int						height = 0;
......
92 92
	 * Constructor
93 93
	 * @param MultiRasterDataset
94 94
	 */
95
	public BufferFactory(MultiRasterDataset rmd) {
95
	public BufferFactory(IRasterDataSource rmd) {
96 96
		mDataset = rmd;
97 97
		width = (int)rmd.getWidth()[0];
98 98
		height = (int)rmd.getHeight()[0];
......
121 121
	 */
122 122
	public void addFile(RasterDataset grf) {
123 123
		try{
124
			mDataset.addDataset(grf);
124
			mDataset.addDataset(new RasterDataset[]{grf});
125 125
			width = grf.getWidth();
126 126
			height = grf.getHeight();
127 127
		}catch(FileNotFoundInListException e) {
......
137 137
	 */
138 138
	public void addFile(String filename) throws NotSupportedExtensionException, RasterDriverException{
139 139
		try{
140
			mDataset.addDataset(filename);
140
			mDataset.addDataset(new String[]{filename});
141 141
			width = (int)mDataset.getWidth()[0];
142 142
			height = (int)mDataset.getHeight()[0];
143 143
		}catch(FileNotFoundInListException e) {
......
173 173
	 * Obtiene la estructura que contiene la lista de ficheros del Grid
174 174
	 * @return GeoRasterMultiFile
175 175
	 */
176
	public MultiRasterDataset getMultiRasterDataset() {
176
	public IRasterDataSource getDataSource() {
177 177
		return mDataset;
178 178
	}
179 179

  
......
507 507
		if(rasterBuf != null)
508 508
			return rasterBuf.getBandCount();
509 509
		else
510
			return this.getMultiRasterDataset().getBandCount();
510
			return this.getDataSource().getBandCount();
511 511
	}
512 512

  
513 513
	/**
......
560 560
	 * 	<TR><TD><B>5:</B></TD><TD>Tama?o de pixel en Y.</TD></TR>
561 561
	 * 	</TABLE>
562 562
	 */
563
	public AffineTransform getCoordsGeoTransformFile() {
563
	/*public AffineTransform getCoordsGeoTransformFile() {
564 564
		return mDataset.getCoordsGeoTransformFile();
565
	}
565
	}*/
566 566

  
567 567
	/**
568 568
	 * Obtiene el extent de la ?ltima selecci?n hecha con alguna de las llamadas

Also available in: Unified diff