gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.impl / src / main / java / org / gvsig / raster / impl / store / QueryableRaster.java @ 2438
History | View | Annotate | Download (4.65 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.raster.impl.store; |
23 |
|
24 |
import java.awt.geom.AffineTransform; |
25 |
import java.awt.geom.Point2D; |
26 |
|
27 |
import org.gvsig.fmap.dal.coverage.datastruct.BandList; |
28 |
import org.gvsig.fmap.dal.coverage.datastruct.Extent; |
29 |
import org.gvsig.fmap.dal.coverage.datastruct.NoData; |
30 |
import org.gvsig.fmap.dal.coverage.store.RasterDataStore; |
31 |
import org.gvsig.fmap.dal.coverage.store.props.ColorTable; |
32 |
import org.gvsig.raster.cache.tile.Tile; |
33 |
import org.gvsig.raster.cache.tile.exception.TileGettingException; |
34 |
import org.gvsig.raster.impl.buffer.SpiRasterQuery; |
35 |
|
36 |
|
37 |
|
38 |
/**
|
39 |
* A kind of dataset which can be queried should implement this interface.
|
40 |
*
|
41 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
42 |
*/
|
43 |
public interface QueryableRaster { |
44 |
|
45 |
/**
|
46 |
* Gets the dataset of this queryable raster
|
47 |
* @return RasterDataSet
|
48 |
*/
|
49 |
public RasterDataStore getDataStore();
|
50 |
|
51 |
/**
|
52 |
* Obtiene la lista de bandas
|
53 |
* @return BandList
|
54 |
*/
|
55 |
public BandList getBands();
|
56 |
|
57 |
/**
|
58 |
* Asigna las bandas dibujables cuando se solicita una acci?n de lectura de datos
|
59 |
* @param db int[]
|
60 |
*/
|
61 |
public void setDrawableBands(int[] db); |
62 |
|
63 |
/**
|
64 |
* Removes the drawable bands
|
65 |
*/
|
66 |
public void clearDrawableBands(); |
67 |
|
68 |
/**
|
69 |
* Obtiene las bandas dibujables cuando se solicita una acci?n de lectura de datos
|
70 |
* @return
|
71 |
*/
|
72 |
public int[] getDrawableBands(); |
73 |
|
74 |
/**
|
75 |
* Obtiene el n?mero de bandas del raster
|
76 |
* @return N?mero de bandas
|
77 |
*/
|
78 |
public int getBandCount(); |
79 |
|
80 |
/**
|
81 |
* Obtiene el valor NoData asociado al raster.
|
82 |
* @return
|
83 |
*/
|
84 |
public NoData getNoDataValue();
|
85 |
|
86 |
/**
|
87 |
* Para este dataset asigna que bandas se pintaran
|
88 |
* sobre el RasterBuf cuando se haga un update. Especificamos a
|
89 |
* trav?s de los par?metros para que posici?n del RasterBuf ir?
|
90 |
* dibujada con que banda del fichero de imagen.
|
91 |
* @param posRasterBuf Posici?n del RasterBuf que queremos pintar.
|
92 |
* @param imageBand Banda de la imagen que se pintar?
|
93 |
*/
|
94 |
public void addDrawableBand(int posRasterBuf, int imageBand); |
95 |
|
96 |
/**
|
97 |
* Obtiene la paleta correspondiente al nombre del fichero pasado por par?metro.
|
98 |
* @param fileName Nombre del fichero
|
99 |
* @return Paleta o null si no la tiene
|
100 |
*/
|
101 |
public ColorTable getColorTable(String fileName); |
102 |
|
103 |
/**
|
104 |
* Obtiene la paleta correspondiente a uno de los ficheros que forman el GeoMultiRasterFile
|
105 |
* @param i Posici?n del raster
|
106 |
* @return Paleta asociada a este o null si no tiene
|
107 |
*/
|
108 |
public ColorTable getColorTable(int i); |
109 |
|
110 |
/**
|
111 |
* Obtiene el extent del raster.
|
112 |
* @return Extent
|
113 |
*/
|
114 |
public Extent getExtent();
|
115 |
|
116 |
/**
|
117 |
* Gets an extent adjusted to the bounding box of this raster
|
118 |
* @param e
|
119 |
* @return
|
120 |
*/
|
121 |
public Extent adjustToExtent(Extent e);
|
122 |
|
123 |
/**
|
124 |
* Obtiene la altura del raster en p?xeles.
|
125 |
* @return altura
|
126 |
*/
|
127 |
public double getHeight(); |
128 |
|
129 |
/**
|
130 |
* Obtiene la anchura del raster en p?xeles.
|
131 |
* @return anchura
|
132 |
*/
|
133 |
public double getWidth(); |
134 |
|
135 |
/**
|
136 |
* Recupera del raster la matriz de transformaci?n que lo situa en cualquier parte de la vista
|
137 |
* @param band
|
138 |
* @return AffineTransform
|
139 |
*/
|
140 |
public AffineTransform getAffineTransform(); |
141 |
|
142 |
/**
|
143 |
* Convierte un punto desde coordenadas pixel a coordenadas del mundo.
|
144 |
* @param pt Punto a transformar
|
145 |
* @return punto transformado en coordenadas del mundo
|
146 |
*/
|
147 |
public Point2D rasterToWorld(Point2D pt); |
148 |
|
149 |
/**
|
150 |
* Convierte un punto desde del mundo a coordenadas pixel.
|
151 |
* @param pt Punto a transformar
|
152 |
* @return punto transformado en coordenadas pixel
|
153 |
*/
|
154 |
public Point2D worldToRaster(Point2D pt); |
155 |
|
156 |
/**
|
157 |
* Gets a tile of data if the provider is able to return a tile
|
158 |
* @param wPx
|
159 |
* @param hPx
|
160 |
* @param row
|
161 |
* @param col
|
162 |
* @param bbox
|
163 |
* @param cacheStruct
|
164 |
* The client CacheStruct or null to use the preferred CacheStruct
|
165 |
* @return
|
166 |
* @throws TileGettingException
|
167 |
*/
|
168 |
public Tile getTile(SpiRasterQuery q) throws TileGettingException; |
169 |
|
170 |
} |