Revision 1930 branches/FMap_03_raster/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/RasterDriver.java

View differences:

RasterDriver.java
1 1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 *
19
 * For more information, contact:
20
 *
21
 *  Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Ib??ez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *      +34 963862235
28
 *   gvsig@gva.es
29
 *      www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   IVER T.I. S.A
34
 *   Salamanca 50
35
 *   46005 Valencia
36
 *   Spain
37
 *
38
 *   +34 963163400
39
 *   dac@iver.es
40
 */
2
*
3
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
4
*
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
*
19
* For more information, contact:
20
*
21
*  Generalitat Valenciana
22
*   Conselleria d'Infraestructures i Transport
23
*   Av. Blasco Ib??ez, 50
24
*   46010 VALENCIA
25
*   SPAIN
26
*
27
*      +34 963862235
28
*   gvsig@gva.es
29
*      www.gvsig.gva.es
30
*
31
*    or
32
*
33
*   IVER T.I. S.A
34
*   Salamanca 50
35
*   46005 Valencia
36
*   Spain
37
*
38
*   +34 963163400
39
*   dac@iver.es
40
*/
41 41
package com.iver.cit.gvsig.fmap.drivers;
42 42

  
43 43
import java.awt.Dimension;
......
50 50
import java.util.ArrayList;
51 51

  
52 52
import org.cresques.cts.ICoordTrans;
53
import org.cresques.io.GeoRasterFile;
54
import org.cresques.io.raster.RasterFilterStack;
55
import org.cresques.px.Extent;
53 56

  
54 57
import com.hardcode.driverManager.Driver;
55 58
import com.iver.cit.gvsig.fmap.ViewPort;
56 59

  
57 60
public interface RasterDriver extends Driver {
58
    /**
59
     * Define los tipos de fichero que puede leer el driver. Si devuelve true,
60
     * el fichero est? aceptado (es de los que el driver puede leer), si
61
     * devuelve false es porque no lo puede leer.
62
     */
61
   /**
62
    * Define los tipos de fichero que puede leer el driver. Si devuelve true,
63
    * el fichero est? aceptado (es de los que el driver puede leer), si
64
    * devuelve false es porque no lo puede leer.
65
    */
63 66
	public boolean fileAccepted(File fName);
64 67
	
65 68
	public void open(File f) throws IOException;
......
68 71

  
69 72
	public void close() throws IOException;
70 73

  
71
    /**
72
     * Obtiene la extensi?n en coordenadas del mundo real que ocupa este raster 
73
     */
74
   /**
75
    * Obtiene la extensi?n en coordenadas del mundo real que ocupa este raster 
76
    */
74 77
	public Rectangle2D getFullExtent();
75
    /**
76
     * Obtiene el n?mero de bandas del raster 
77
     */
78
   /**
79
    * Obtiene el n?mero de bandas del raster 
80
    */
78 81
	public int getNumBands();
79 82
	
80 83
	public int getTransparency();
......
118 121
	 */
119 122
	public int getRasterDataType();
120 123

  
121
    /**
122
     * Obtiene una muestra del pixel que se pasa como par?metro en la banda que se pasa como par?metro 
123
     */
124
   /**
125
    * Obtiene una muestra del pixel que se pasa como par?metro en la banda que se pasa como par?metro 
126
    */
124 127
	public Object getData(int x, int y, int band);
125 128

  
126
    /**
127
     * Obtiene una muestra del pixel que se pasa como par?metro en la banda que se pasa como par?metro 
128
     */
129
   /**
130
    * Obtiene una muestra del pixel que se pasa como par?metro en la banda que se pasa como par?metro 
131
    */
129 132
	public int getDataAsInt(int x, int y, int band);
130 133

  
131
    /**
132
     * Obtiene una muestra del pixel que se pasa como par?metro en la banda que se pasa como par?metro 
133
     */
134
   /**
135
    * Obtiene una muestra del pixel que se pasa como par?metro en la banda que se pasa como par?metro 
136
    */
134 137
	public byte getDataAsByte(int x, int y, int band);
135 138

  
136
    /**
137
     * Obtiene una muestra del pixel que se pasa como par?metro en la banda que se pasa como par?metro 
138
     */
139
   /**
140
    * Obtiene una muestra del pixel que se pasa como par?metro en la banda que se pasa como par?metro 
141
    */
139 142
	public float getDataAsFloat(int x, int y, int band);
140 143

  
141
    /**
142
     * Obtiene una muestra el pixel que se pasa como par?metro en la banda que se pasa como par?metro 
143
     */
144
   /**
145
    * Obtiene una muestra el pixel que se pasa como par?metro en la banda que se pasa como par?metro 
146
    */
144 147
	public double getDataAsDouble(int x, int y, int band);
145 148
	
146 149
	/**
......
153 156
	 */
154 157
	public Image getImage(Dimension size, Rectangle2D userSize, ICoordTrans rp);
155 158
	
159
	/**
160
	 * Obtiene un array con atributos de la imagen
161
	 * @return Lista de atributos
162
	 */
156 163
	public ArrayList getAttributes();
164
	
165
	/**
166
	 * Obtiene una banda
167
	 * @param flag	banda a recuperar
168
	 */
169
	public int getBand(int flag);
170
	
171
	/**
172
	 * Devuelve la posici?n del fichero para la banda especificada.
173
	 * @param flag banda.
174
	 * @return posici?n del fichero
175
	 */
176
	public int getPosFile(int flag);
157 177

  
178
	
179
	/**
180
	 * Activa o desactiva la transparencia
181
	 * @param t	true activa la transparencia y false la desactiva
182
	 */
183
	public void setTransparency(boolean t);
184
	
185
	/**
186
	 * Asocia un colorBand al rojo, verde o azul.
187
	 * @param flag cual (o cuales) de las bandas.
188
	 * @param nBand	que colorBand
189
	 */
190
	public void setBand(int flag, int nBand);
191
	
192
	/**
193
	 * Obtiene la pila de filtros
194
	 * @return	Pila de filtros
195
	 */
196
	public RasterFilterStack getFilterStack();
197
	
198
	
199
	public GeoRasterFile [] getFiles();
200
	
201
	/**
202
	 * Asigna un fichero al PxRaster
203
	 * @param fileName Nombre del fichero
204
	 */
205
	public void addFile(String fileName);
206

  
207
	/**
208
	 * Elimina un fichero al PxRaster
209
	 * @param fileName Nombre del fichero
210
	 */
211
	public void delFile(String fileName);
158 212
}

Also available in: Unified diff