gvsig-raster / org.gvsig.raster.cache / trunk / org.gvsig.raster.cache / org.gvsig.raster.cache.lib.impl / src / main / java / org / gvsig / raster / cache / buffer / impl / datasource / IRasterDataSource.java @ 995
History | View | Annotate | Download (3.46 KB)
1 |
package org.gvsig.raster.cache.buffer.impl.datasource; |
---|---|
2 |
|
3 |
import java.awt.geom.Point2D; |
4 |
|
5 |
import org.gvsig.raster.cache.buffer.Buffer; |
6 |
|
7 |
/**
|
8 |
* Interfaz que deben implementar cualquier fuente de datos raster. Cualquier fuente
|
9 |
* de datos que alimente una cache de informaci?n debe implementar este interfaz para
|
10 |
* que pueda ser aprovechada por esta.
|
11 |
*
|
12 |
* @version 27/08/2007
|
13 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
14 |
*
|
15 |
*/
|
16 |
public interface IRasterDataSource { |
17 |
|
18 |
/**
|
19 |
* Obtiene el tipo de dato por banda
|
20 |
* @return tipo de dato por banda
|
21 |
*/
|
22 |
public int[] getDataType(); |
23 |
|
24 |
/**
|
25 |
* Obtiene el valor NoData asociado al raster.
|
26 |
* @return
|
27 |
*/
|
28 |
public double getNoDataValue(); |
29 |
|
30 |
/**
|
31 |
* Obtiene el n?mero de bandas del raster
|
32 |
* @return N?mero de bandas
|
33 |
*/
|
34 |
public int getBandCount(); |
35 |
|
36 |
/**
|
37 |
* Obtiene el n?mero de datasets con el extent completo del IRasterDataSource. El valor
|
38 |
* devuelto por esta llamada coincidir?a con el valor devuelto por getDatasetCount() de un
|
39 |
* MultiRasterDataset que lo compone.
|
40 |
* @return integer.
|
41 |
*/
|
42 |
public int getDatasetCount(); |
43 |
|
44 |
/**
|
45 |
* Obtiene la altura del raster en p?xeles.
|
46 |
* @return altura
|
47 |
*/
|
48 |
public double getHeight(); |
49 |
|
50 |
/**
|
51 |
* Obtiene la anchura del raster en p?xeles.
|
52 |
* @return anchura
|
53 |
*/
|
54 |
public double getWidth(); |
55 |
|
56 |
/**
|
57 |
* Obtiene una ventana de datos de la imagen a partir de coordenadas reales.
|
58 |
* No aplica supersampleo ni subsampleo sino que devuelve una matriz de igual tama?o a los
|
59 |
* pixeles de disco.
|
60 |
* @param x Posici?n X superior izquierda
|
61 |
* @param y Posici?n Y superior izquierda
|
62 |
* @param w Ancho en coordenadas pixel
|
63 |
* @param h Alto en coordenadas pixel
|
64 |
* @param bandList
|
65 |
* @return Buffer de datos
|
66 |
*/
|
67 |
public Buffer getWindowRaster(int x, int y, int w, int h) |
68 |
throws InvalidSetViewException, InterruptedException, DriverException; |
69 |
|
70 |
/**
|
71 |
* Obtiene una ventana de datos de la imagen a partir de coordenadas reales.
|
72 |
* Aplica supersampleo o subsampleo en funci?n del tama?o del buffer
|
73 |
* @param x Posici?n X superior izquierda en pixels
|
74 |
* @param y Posici?n Y superior izquierda en pixels
|
75 |
* @param w Ancho en pixels
|
76 |
* @param h Alto en pixels
|
77 |
* @param bufWidth ancho del buffer de datos
|
78 |
* @param bufHeight alto del buffer de datos
|
79 |
* @param bandList
|
80 |
* @return Buffer de datos
|
81 |
*/
|
82 |
public Buffer getWindowRaster(int x, int y, int w, int h, int bufWidth, int bufHeight) |
83 |
throws InvalidSetViewException, InterruptedException, DriverException; |
84 |
|
85 |
/**
|
86 |
* Obtiene el valor del raster en la coordenada que se le pasa.
|
87 |
* El valor ser? Double, Int, Byte, etc. dependiendo del tipo de
|
88 |
* raster.
|
89 |
* @param x coordenada X
|
90 |
* @param y coordenada Y
|
91 |
* @return
|
92 |
*/
|
93 |
public Object getData(int x, int y, int band)throws InvalidSetViewException, FileNotOpenException, DriverException; |
94 |
|
95 |
/**
|
96 |
* Metodo que obtiene si un punto cae dentro de los l?mites de la extensi?n de la fuente de
|
97 |
* datos raster o fuera de ellos.
|
98 |
* @param p Punto a calcular
|
99 |
* @return true si est? dentro de los l?mites y false si est? fuera
|
100 |
*/
|
101 |
public boolean isInside(Point2D p); |
102 |
|
103 |
/**
|
104 |
* Obtiene en un array de String la lista de nombres de ficheros.
|
105 |
* @param i Columna para un CompositeDataset
|
106 |
* @param j Fila para un CompositeDataset
|
107 |
* @return lista de nombres de los ficheros del GeoRasterMultiFile
|
108 |
*/
|
109 |
public String[] getNameDatasetStringList(int i, int j); |
110 |
|
111 |
/**
|
112 |
* Calcula el tama?o en byte de los raster.
|
113 |
* @return tama?o en bytes de todos los ficheros de la lista
|
114 |
*/
|
115 |
public long getFileSize(); |
116 |
|
117 |
} |