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