Revision 2232 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/grid/render/DefaultRender.java
DefaultRender.java | ||
---|---|---|
38 | 38 |
import org.gvsig.fmap.dal.coverage.datastruct.ViewPortData; |
39 | 39 |
import org.gvsig.fmap.dal.coverage.exception.FilterManagerException; |
40 | 40 |
import org.gvsig.fmap.dal.coverage.exception.FilterTypeException; |
41 |
import org.gvsig.fmap.dal.coverage.exception.InvalidSetViewException; |
|
42 | 41 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
43 |
import org.gvsig.fmap.dal.coverage.exception.RasterDriverException;
|
|
42 |
import org.gvsig.fmap.dal.coverage.exception.QueryException;
|
|
44 | 43 |
import org.gvsig.fmap.dal.coverage.grid.FilterListChangeEvent; |
45 | 44 |
import org.gvsig.fmap.dal.coverage.grid.FilterListChangeListener; |
46 | 45 |
import org.gvsig.fmap.dal.coverage.grid.Grid; |
... | ... | |
280 | 279 |
public void run() { |
281 | 280 |
try { |
282 | 281 |
draw(lastGraphics, lastViewPortData, null); |
283 |
} catch (RasterDriverException e) { |
|
284 |
LoggerFactory.getLogger(getClass()).debug("Error reading data", e); |
|
285 |
} catch (InvalidSetViewException e) { |
|
286 |
LoggerFactory.getLogger(getClass()).debug("Invalid view", e); |
|
282 |
} catch (QueryException e) { |
|
283 |
LoggerFactory.getLogger(getClass()).debug("Error in a query", e); |
|
287 | 284 |
} catch (ProcessInterruptedException e) { |
288 | 285 |
} |
289 | 286 |
} |
... | ... | |
315 | 312 |
ViewPortData vp, |
316 | 313 |
Dimension2D viewDimension, |
317 | 314 |
TaskStatus taskStatus) |
318 |
throws RasterDriverException, InvalidSetViewException, ProcessInterruptedException {
|
|
315 |
throws QueryException, ProcessInterruptedException {
|
|
319 | 316 |
lastGraphics = g; |
320 | 317 |
lastViewPortData = vp; |
321 | 318 |
this.viewDimension = viewDimension; |
... | ... | |
348 | 345 |
} |
349 | 346 |
|
350 | 347 |
public synchronized Buffer getLastRenderBuffer() |
351 |
throws RasterDriverException, InvalidSetViewException, ProcessInterruptedException {
|
|
348 |
throws QueryException, ProcessInterruptedException {
|
|
352 | 349 |
return draw(null, lastViewPortData, null); |
353 | 350 |
} |
354 | 351 |
|
355 | 352 |
public synchronized Buffer draw(Graphics2D g, ViewPortData vp, TaskStatus taskStatus) |
356 |
throws RasterDriverException, InvalidSetViewException, ProcessInterruptedException {
|
|
353 |
throws QueryException, ProcessInterruptedException {
|
|
357 | 354 |
lastGraphics = g; |
358 | 355 |
lastViewPortData = vp; |
359 | 356 |
|
... | ... | |
401 | 398 |
query.setAreaOfInterest(adjustedRotedRequest, (int)Math.round(widthImage), (int)Math.round(heightImage)); |
402 | 399 |
query.setDrawableBands(getRenderBands()); |
403 | 400 |
buf = dataStore.query(query); |
404 |
((DefaultRasterQuery)query).setOutputBuffer(null);
|
|
401 |
((DefaultRasterQuery)query).setBufferForProviders(null);
|
|
405 | 402 |
query.setSupersamplingLoadingBuffer(true); |
406 |
step = dataStore.getStep();
|
|
403 |
step = query.getSteps();
|
|
407 | 404 |
} |
408 | 405 |
|
409 | 406 |
if(drawer == null) { |
... | ... | |
423 | 420 |
* @see org.gvsig.fmap.dal.coverage.grid.render.Render#draw(java.awt.Graphics2D, org.cresques.geo.ViewPortData) |
424 | 421 |
*/ |
425 | 422 |
private synchronized Buffer drawBufferOnImage(Graphics2D g, ViewPortData vp, Buffer buf, double[] step, AffineTransform transf, Extent adjustedRotedRequest) |
426 |
throws RasterDriverException, InvalidSetViewException, ProcessInterruptedException {
|
|
423 |
throws QueryException, ProcessInterruptedException {
|
|
427 | 424 |
|
428 | 425 |
grid = bufferPreprocessing(buf, lastTransparency); |
429 | 426 |
|
... | ... | |
583 | 580 |
} else { |
584 | 581 |
try { |
585 | 582 |
drawBufferOnImage(lastGraphics, lastViewPortData, buf, step, transf, e); |
586 |
} catch (RasterDriverException e1) {
|
|
583 |
} catch (QueryException e1) {
|
|
587 | 584 |
LoggerFactory.getLogger(getClass()).debug("Error loading data", e1); |
588 |
} catch (InvalidSetViewException e1) { |
|
589 |
LoggerFactory.getLogger(getClass()).debug("Invalid view", e1); |
|
590 | 585 |
} catch (ProcessInterruptedException e1) { |
591 | 586 |
} |
592 | 587 |
} |
Also available in: Unified diff