Revision 38059 trunk/extensions/extWCS/src/com/iver/cit/gvsig/fmap/layers/FLyrWCS.java

View differences:

FLyrWCS.java
455 455
	private void initializeRasterLayer(MultiRasterDataset[][] datasets, IBuffer[][] buf) throws LoadLayerException, InterruptedException {
456 456
		if(this.filterList != null)
457 457
			getRender().setFilterList(filterList);
458

  
459 458
		if(this.renderBands != null)
460 459
			getRender().setRenderBands(renderBands);
460

  
461 461
		if(datasets != null) {
462 462
			String[][] names = new String[datasets.length][datasets[0].length];
463 463
			for (int i = 0; i < datasets.length; i++) {
......
469 469
			super.setLoadParams(names);
470 470
		}
471 471
		super.init();
472
		if(buf != null) {
472
		if((buf != null) && (buf[0][0] != null)) {
473 473
			int drawablesBandCount = layerRaster[0].getDataSource().getBands().getDrawableBandsCount();
474 474
			IBuffer buff = null;
475 475
			if(dataset instanceof CompositeDataset)
......
481 481
				getRender().getLastRenderBuffer().free();
482 482
			getRender().setLastRenderBuffer(buff);
483 483
		}
484

  
485 484
		if (transparency == null)
486 485
			transparency = new GridTransparency(getDataSource().getTransparencyFilesStatus());
487 486

  
......
562 561
			try {
563 562
				rasterProcess(filePath, g, vp, scale, cancel, nLyr);
564 563
			} catch (FilterTypeException e) {
564
				e.printStackTrace();
565 565
			}
566 566

  
567 567
		} catch (IOException e) {
......
623 623
	private void rasterProcess(String filePath, Graphics2D g, ViewPort vp, double scale, Cancellable cancel, int nLyr) throws ReadDriverException, LoadLayerException, FilterTypeException {
624 624
		//Cargamos el dataset con el raster de disco.
625 625
		layerRaster[nLyr] = FLyrRasterSE.createLayer("", filePath, vp.getProjection());
626
		layerRaster[nLyr].init();
626
		
627
//		layerRaster[nLyr].init();
627 628
		//layerRaster[nLyr].getRender().setBufferFactory(layerRaster[nLyr].getBufferFactory());
628 629
		
629 630
		if(visualStatus.dataType == IBuffer.TYPE_UNDEFINED && layerRaster[nLyr].getDataType() != null)

Also available in: Unified diff