Revision 2438 org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/provider/RasterProvider.java
RasterProvider.java | ||
---|---|---|
28 | 28 |
import org.cresques.cts.IProjection; |
29 | 29 |
import org.gvsig.compat.net.ICancellable; |
30 | 30 |
import org.gvsig.fmap.dal.coverage.dataset.Buffer; |
31 |
import org.gvsig.fmap.dal.coverage.datastruct.BandList; |
|
32 | 31 |
import org.gvsig.fmap.dal.coverage.datastruct.Extent; |
33 | 32 |
import org.gvsig.fmap.dal.coverage.datastruct.GeoPointList; |
34 | 33 |
import org.gvsig.fmap.dal.coverage.datastruct.NoData; |
... | ... | |
53 | 52 |
import org.gvsig.fmap.dal.coverage.store.props.Transparency; |
54 | 53 |
import org.gvsig.fmap.dal.raster.spi.CoverageStoreProvider; |
55 | 54 |
import org.gvsig.raster.cache.tile.provider.TileServer; |
55 |
import org.gvsig.raster.impl.buffer.SpiRasterQuery; |
|
56 | 56 |
|
57 | 57 |
/** |
58 |
* Interfaz que deben implementar cualquier fuente de datos raster. Estas pueden estar |
|
59 |
* compuestas por N datasets. B?sicamente hay dos fuentes que deben implementar este interfaz, |
|
60 |
* MultiRasterDataset y CompositeDataset. La primera es un dataset compuesto por varios ficheros |
|
61 |
* con el mismo Extent de N bandas cada uno. MultiRasterDataset proporciona una encapsulaci?n al acceso |
|
62 |
* a datos de todos ellos. CompositeDataset es un dataset compuesto de N MultiRasterDatasets cuya extensi?n |
|
63 |
* es continua formando un Grid de datasets con continuidad espacial. IRasterDataSource proporciona |
|
64 |
* una visi?n de acceso a datos com?n para ambos. |
|
58 |
* This interface have to be implemented by a raster data source. Is used by a store to |
|
59 |
* provide services from a specific source. |
|
65 | 60 |
* |
66 | 61 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
67 | 62 |
* |
... | ... | |
442 | 437 |
public String getWktProjection() throws RasterDriverException; |
443 | 438 |
|
444 | 439 |
/** |
445 |
* Dado unas coordenadas reales, un tama?o de buffer y un tama?o de raster. |
|
446 |
* Si el buffer es de mayor tama?o que el raster (supersampleo) quiere decir que |
|
447 |
* por cada pixel de buffer se repiten varios del raster. Esta funci?n calcula el |
|
448 |
* n?mero de pixels de desplazamiento en X e Y que corresponden al primer pixel del |
|
449 |
* buffer en la esquina superior izquierda. Esto es necesario porque la coordenada |
|
450 |
* solicitada es real y puede no caer sobre un pixel completo. Este calculo es |
|
451 |
* util cuando un cliente quiere supersamplear sobre un buffer y que no se lo haga |
|
452 |
* el driver autom?ticamente. |
|
453 |
* @param dWorldTLX Coordenada real X superior izquierda |
|
454 |
* @param dWorldTLY Coordenada real Y superior izquierda |
|
455 |
* @param nWidth Ancho del raster |
|
456 |
* @param nHeight Alto del raster |
|
457 |
* @param bufWidth Ancho del buffer |
|
458 |
* @param bufHeight Alto del buffer |
|
459 |
* @return Array de cuatro. Los dos primeros elementos son el desplazamiento en X e Y y los dos segundos |
|
460 |
* el tama?o en pixels de buffer de un pixel de la imagen en ancho y alto. |
|
461 |
*/ |
|
462 |
public double[] calcSteps(double dWorldTLX, double dWorldTLY, double dWorldBRX, double dWorldBRY, |
|
463 |
double nWidth, double nHeight, int bufWidth, int bufHeight); |
|
464 |
|
|
465 |
/** |
|
466 | 440 |
* Sets the nodata value |
467 | 441 |
* @return |
468 | 442 |
*/ |
... | ... | |
504 | 478 |
public RasterDataParameters getDataParameters(); |
505 | 479 |
|
506 | 480 |
/** |
507 |
* Lee un bloque completo de datos del raster y devuelve un array tridimensional del tipo correcto. Esta funci?n es util |
|
508 |
* para una lectura rapida de todo el fichero sin necesidad de asignar vista. |
|
509 |
* @param pos Posici?n donde se empieza a leer |
|
510 |
* @param blockHeight Altura m?xima del bloque leido |
|
511 |
* @return Object que es un array tridimendional del tipo de datos del raster. (Bandas X Filas X Columnas) |
|
512 |
* @throws InvalidSetViewException |
|
513 |
* @throws FileNotOpenException |
|
514 |
* @throws RasterDriverException |
|
481 |
* Reads a complete block of data and returns an tridimensional array of the right type. This function is useful |
|
482 |
* to read a file very fast without setting a view. |
|
483 |
* @deprecated This method is only used to generate statistics. The statistics have to change the way in |
|
484 |
* which are calculated. Then this function will be eliminated. |
|
515 | 485 |
*/ |
516 | 486 |
public Object readBlock(int pos, int blockHeight, double scale) |
517 | 487 |
throws InvalidSetViewException, FileNotOpenException, RasterDriverException, ProcessInterruptedException; |
... | ... | |
579 | 549 |
public TileServer getTileServer(); |
580 | 550 |
|
581 | 551 |
/** |
582 |
* Some sevices has neither limits nor pixel size. For instance, WebMapService
|
|
552 |
* Some services neither has limits nor pixel size. For instance, WebMapService
|
|
583 | 553 |
* is a service of this type if the size is not fixed. Other services, like |
584 | 554 |
* WMTS are enclosed too but in this case it will have resolution by level. |
585 | 555 |
* This method returns true if the data source is enclosed. |
... | ... | |
638 | 608 |
* @throws RasterDriverException |
639 | 609 |
* @throws ProcessInterruptedException |
640 | 610 |
*/ |
641 |
public Buffer getDataSet(RasterQuery query) throws ProcessInterruptedException, RasterDriverException; |
|
611 |
public Buffer getDataSet(SpiRasterQuery query) throws ProcessInterruptedException, RasterDriverException;
|
|
642 | 612 |
|
643 | 613 |
/** |
644 | 614 |
* Gets the list of geo points associated to this provider |
... | ... | |
651 | 621 |
*/ |
652 | 622 |
public void setGeoPointList(GeoPointList geoPointList); |
653 | 623 |
|
654 |
/** |
|
655 |
* Gets a default band list for this provider |
|
656 |
* @return |
|
657 |
*/ |
|
658 |
public BandList getDefaultBandList(); |
|
659 | 624 |
} |
Also available in: Unified diff