Revision 2239 org.gvsig.raster.tilecache/branches/org.gvsig.raster.tilecache_dataaccess_refactoring/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileProvider.java
TileProvider.java | ||
---|---|---|
86 | 86 |
import org.gvsig.raster.impl.datastruct.DatasetBandImpl; |
87 | 87 |
import org.gvsig.raster.impl.datastruct.ExtentImpl; |
88 | 88 |
import org.gvsig.raster.impl.provider.AbstractRasterProvider; |
89 |
import org.gvsig.raster.impl.provider.MemoryTileMatrixBuffer; |
|
89 | 90 |
import org.gvsig.raster.impl.provider.RasterProvider; |
90 | 91 |
import org.gvsig.raster.impl.provider.RemoteRasterProvider; |
91 | 92 |
import org.gvsig.raster.impl.provider.TiledRasterProvider; |
... | ... | |
654 | 655 |
q.getBandList(), |
655 | 656 |
q.getAdjustedBufWidth(), |
656 | 657 |
q.getAdjustedBufHeight()); |
657 |
tiledLayer.getTiles(tileList, q.getTileListener(), q.getTaskStatus()); |
|
658 |
if(q.requestIsTiled()) |
|
659 |
tiledLayer.getTiles(tileList, q.getTileListener(), q.getTaskStatus()); |
|
660 |
else { |
|
661 |
/* TODO: De esta forma las peticiones no tileadas se hacen a los tiles. |
|
662 |
* Funciona bien pero habr?a que revisar la memoria que consume MemoryTileMatrixBuffer |
|
663 |
* En cualquier caso parece que llamar directamente al proveedor que se est? tileando |
|
664 |
* No da problemas y el resultado de los procesos ser?a el mismo que en la capa sin tilear. |
|
665 |
for (int i = 0; i < tileList.size(); i++) { |
|
666 |
tiledLayer.getTile(tileList.get(i)); |
|
667 |
} |
|
668 |
MemoryTileMatrixBuffer matrixBuffer = new MemoryTileMatrixBuffer(tileList); |
|
669 |
Buffer buf = matrixBuffer.getWindow(q.getAdjustedRequestBoundingBox(), q.getBufferForProviders()); |
|
670 |
q.setBufferResult(buf);*/ |
|
671 |
((AbstractRasterProvider)provider).loadBuffer(q); |
|
672 |
} |
|
673 |
|
|
658 | 674 |
} catch (TileGettingException e) { |
659 | 675 |
throw new RasterDriverException("Error getting the tile list", e); |
660 | 676 |
} catch (TileBuildException e) { |
... | ... | |
684 | 700 |
for (int i = 0; i < tileList.size(); i++) { |
685 | 701 |
tiledLayer.getTile(tileList.get(i)); |
686 | 702 |
} |
687 |
} catch (TileGettingException e) { |
|
703 |
} catch (TileGettingException e) {public static final int TYPE_PX_RESCALED = 5;
|
|
688 | 704 |
throw new RasterDriverException("Error getting the tile list", e); |
689 | 705 |
} catch (TileBuildException e) { |
690 | 706 |
throw new RasterDriverException("Error building the tile list", e); |
Also available in: Unified diff