Revision 11207 trunk/libraries/libRaster/src/org/gvsig/raster/dataset/io/GdalDriver.java

View differences:

GdalDriver.java
238 238
		}
239 239
	}
240 240
	
241
	/*
242
	 *  (non-Javadoc)
243
	 * @see org.gvsig.raster.dataset.RasterDataset#readBlock(int, int)
244
	 */	 
245
	public Object readBlock(int pos, int blockHeight) throws InvalidSetViewException, FileNotOpenException, RasterDriverException {
246
		if(pos < 0)
247
			throw new InvalidSetViewException("Request out of grid");
248
		
249
		if((pos + blockHeight) > getHeight())
250
			blockHeight = Math.abs(getHeight() - pos);
251
		try{
252
			return file.readBlock(pos, blockHeight);
253
		}catch(GdalException e){
254
			throw new RasterDriverException("Error reading data from Gdal library");
255
		}
256
	}
257
	
241 258
	/*private IBuffer getRaster(int width, int height, ICoordTrans rp) {
242 259
		int line;
243 260
		IBuffer raster = null;
......
550 567
		// TODO Auto-generated method stub
551 568
		
552 569
	}
570

  
571
	
553 572
}
554 573

  
555 574

  

Also available in: Unified diff