root / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / drivers / RasterDriver.java @ 1455
History | View | Annotate | Download (4.78 KB)
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 |
*/
|
41 |
package com.iver.cit.gvsig.fmap.drivers; |
42 |
|
43 |
import java.awt.Dimension; |
44 |
import java.awt.Graphics2D; |
45 |
import java.awt.Image; |
46 |
import java.awt.geom.Rectangle2D; |
47 |
import java.awt.image.BufferedImage; |
48 |
import java.io.File; |
49 |
import java.io.IOException; |
50 |
|
51 |
import org.cresques.cts.ICoordTrans; |
52 |
|
53 |
import com.hardcode.driverManager.Driver; |
54 |
import com.iver.cit.gvsig.fmap.ViewPort; |
55 |
|
56 |
public interface RasterDriver extends Driver { |
57 |
/**
|
58 |
* Define los tipos de fichero que puede leer el driver. Si devuelve true,
|
59 |
* el fichero est? aceptado (es de los que el driver puede leer), si
|
60 |
* devuelve false es porque no lo puede leer.
|
61 |
*/
|
62 |
public boolean fileAccepted(File fName); |
63 |
|
64 |
public void open(File f) throws IOException; |
65 |
|
66 |
public void initialize() throws IOException; |
67 |
|
68 |
public void close() throws IOException; |
69 |
|
70 |
/**
|
71 |
* Obtiene la extensi?n en coordenadas del mundo real que ocupa este raster
|
72 |
*/
|
73 |
public Rectangle2D getFullExtent(); |
74 |
/**
|
75 |
* Obtiene el n?mero de bandas del raster
|
76 |
*/
|
77 |
public int getNumBands(); |
78 |
|
79 |
public int getTransparency(); |
80 |
|
81 |
public void setTransparency(int trans); |
82 |
|
83 |
/**
|
84 |
* @see com.iver.cit.gvsig.fmap.layers.LayerOperations#draw(java.awt.image.BufferedImage, java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort)
|
85 |
*/
|
86 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort) |
87 |
throws DriverIOException;
|
88 |
|
89 |
/**
|
90 |
* Obtiene el valor que el raster tiene en la posici?n x, y del bitmap
|
91 |
* @see com.iver.cit.gvsig.fmap.layers.RasterComplexOperations#getValueByCoords(int, int, int)
|
92 |
* /
|
93 |
byte[] getPixel(int x, int y, byte[] dArray);
|
94 |
|
95 |
/ **
|
96 |
* Obtiene el valor que el raster tiene en la posici?n x, y del bitmap
|
97 |
* @see com.iver.cit.gvsig.fmap.layers.RasterComplexOperations#getValueByCoords(int, int, int)
|
98 |
* /
|
99 |
int[] getPixel(int x, int y, int[] dArray);
|
100 |
|
101 |
/**
|
102 |
* Obtiene el valor que el raster tiene en la posici?n x, y del bitmap
|
103 |
* @see com.iver.cit.gvsig.fmap.layers.RasterComplexOperations#getValueByCoords(int, int, int)
|
104 |
* /
|
105 |
float[] getPixel(int x, int y, float[] dArray);
|
106 |
|
107 |
/**
|
108 |
* Obtiene el valor que el raster tiene en la posici?n x, y del mundo real para la banda que se pasa como par?metro
|
109 |
* @see com.iver.cit.gvsig.fmap.layers.RasterComplexOperations#getValueByCoords(int, int, int)
|
110 |
* /
|
111 |
double[] getPixel(int x, int y, double[] dArray);
|
112 |
*/
|
113 |
|
114 |
/**
|
115 |
* Devuelve el tipo de datos del raster
|
116 |
* @see java.awt.image.DataBuffer
|
117 |
*/
|
118 |
public int getRasterDataType(); |
119 |
|
120 |
/**
|
121 |
* Obtiene una muestra del pixel que se pasa como par?metro en la banda que se pasa como par?metro
|
122 |
*/
|
123 |
public Object getData(int x, int y, int band); |
124 |
|
125 |
/**
|
126 |
* Obtiene una muestra del pixel que se pasa como par?metro en la banda que se pasa como par?metro
|
127 |
*/
|
128 |
public int getDataAsInt(int x, int y, int band); |
129 |
|
130 |
/**
|
131 |
* Obtiene una muestra del pixel que se pasa como par?metro en la banda que se pasa como par?metro
|
132 |
*/
|
133 |
public byte getDataAsByte(int x, int y, int band); |
134 |
|
135 |
/**
|
136 |
* Obtiene una muestra del pixel que se pasa como par?metro en la banda que se pasa como par?metro
|
137 |
*/
|
138 |
public float getDataAsFloat(int x, int y, int band); |
139 |
|
140 |
/**
|
141 |
* Obtiene una muestra el pixel que se pasa como par?metro en la banda que se pasa como par?metro
|
142 |
*/
|
143 |
public double getDataAsDouble(int x, int y, int band); |
144 |
|
145 |
/**
|
146 |
* Obtiene una imagen de tama?o especificado, de la zona (en
|
147 |
* coordenadas de usuario) que se le pide.
|
148 |
* @param size Tama?o (en p?xeles de im?gen).
|
149 |
* @param userSize Zona especificada (en coordenadas de usuario).
|
150 |
* @param rp Reproyecci?n.
|
151 |
* @return La imagen.
|
152 |
*/
|
153 |
public Image getImage(Dimension size, Rectangle2D userSize, ICoordTrans rp); |
154 |
|
155 |
} |