svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.api / src / main / java / org / gvsig / fmap / dal / raster / RasterStore.java @ 44831
History | View | Annotate | Download (5.49 KB)
1 |
/* gvSIG. Desktop Geographic Information System.
|
---|---|
2 |
*
|
3 |
* Copyright ? 2007-2016 gvSIG Association
|
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., 51 Franklin Street, Fifth Floor, Boston,
|
18 |
* MA 02110-1301, USA.
|
19 |
*
|
20 |
* For any additional information, do not hesitate to contact us
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
22 |
*/
|
23 |
package org.gvsig.fmap.dal.raster; |
24 |
|
25 |
import java.util.List; |
26 |
|
27 |
import org.gvsig.fmap.dal.DataStore; |
28 |
import org.gvsig.fmap.dal.DataStoreParameters; |
29 |
import org.gvsig.fmap.dal.exception.DataException; |
30 |
import org.gvsig.fmap.dal.exception.InitializeException; |
31 |
import org.gvsig.fmap.geom.exception.CreateEnvelopeException; |
32 |
import org.gvsig.fmap.geom.primitive.Envelope; |
33 |
import org.gvsig.raster.lib.buffer.api.BandInfo; |
34 |
import org.gvsig.raster.lib.buffer.api.BufferDimensions; |
35 |
import org.gvsig.tools.dynobject.DynObject; |
36 |
import org.gvsig.tools.lang.Cloneable; |
37 |
import org.gvsig.tools.locator.LocatorException; |
38 |
import org.gvsig.tools.observer.Observer; |
39 |
|
40 |
/**
|
41 |
* Store for rasters
|
42 |
* @author dmartinezizquierdo
|
43 |
*
|
44 |
*/
|
45 |
public interface RasterStore extends DataStore, Cloneable{ |
46 |
|
47 |
/**
|
48 |
* May provide a dynamic method to get the legend
|
49 |
*/
|
50 |
final public static String DYNMETHOD_GETLEGEND_NAME = "getLegend"; |
51 |
|
52 |
/**
|
53 |
* May provide a dynamic method to get the Color Interpretation
|
54 |
*/
|
55 |
final public static String DYNMETHOD_GETCOLORINTERPRETATION_NAME = "getColorInterpretation"; |
56 |
|
57 |
/**
|
58 |
* May provide a dynamic method to get the Color Table
|
59 |
*/
|
60 |
final public static String DYNMETHOD_GETCOLORTABLE_NAME = "getColorTable"; |
61 |
/**
|
62 |
* Returns this store's parameters.
|
63 |
*
|
64 |
* @return
|
65 |
* {@link DataStoreParameters} containing this store's parameters
|
66 |
*/
|
67 |
public DataStoreParameters getParameters();
|
68 |
|
69 |
/**
|
70 |
* Returns all available data in the store
|
71 |
* @return RasterSet
|
72 |
* @throws DataException
|
73 |
*/
|
74 |
RasterSet getRasterSet() throws DataException;
|
75 |
|
76 |
/**
|
77 |
* Returns a subset of data taking into account the properties and
|
78 |
* restrictions of the RasterQuery.
|
79 |
* @param rasterQuery
|
80 |
* @param RasterQuery
|
81 |
* @return RasterSet
|
82 |
* @throws DataException
|
83 |
*/
|
84 |
RasterSet getRasterSet(RasterQuery rasterQuery) throws DataException;
|
85 |
|
86 |
/**
|
87 |
* Returns a new {@link RasterQuery} associated to this store.
|
88 |
* @return RasterQuery
|
89 |
*/
|
90 |
RasterQuery createRasterQuery(); |
91 |
|
92 |
/**
|
93 |
* Returns the envelope associated to this store buffer
|
94 |
* @return Envelope
|
95 |
* @throws DataException
|
96 |
* @throws CreateEnvelopeException
|
97 |
* @throws LocatorException
|
98 |
*/
|
99 |
Envelope getEnvelope() throws DataException, LocatorException, CreateEnvelopeException;
|
100 |
|
101 |
/**
|
102 |
* Creates a {@link BandQuery} from band received as parameter.
|
103 |
*
|
104 |
* @param band
|
105 |
* Band to create BandQuery
|
106 |
* @return BandQuery
|
107 |
*/
|
108 |
public BandQuery createBandQuery(int band); |
109 |
|
110 |
/**
|
111 |
* Gets {@link BandsDescriptor} of band received as parameter. If band does
|
112 |
* not have {@link BandDescriptor}, this method will return an
|
113 |
* empty {@link BandsDescriptor}.
|
114 |
*
|
115 |
* @param band
|
116 |
* Band to get its {@link BandsDescriptor}
|
117 |
* @return BandDescriptor
|
118 |
*/
|
119 |
public BandDescriptor getBandDescriptor(int band); |
120 |
|
121 |
/**
|
122 |
* Gets number of total bands
|
123 |
*
|
124 |
* @return Number of bands
|
125 |
*/
|
126 |
public int getBands(); |
127 |
|
128 |
public List<BandDescriptor> getBandDescriptors(); |
129 |
|
130 |
/**
|
131 |
* @return
|
132 |
*/
|
133 |
public RasterCache getCache();
|
134 |
|
135 |
/**
|
136 |
* Add a band from other store.
|
137 |
* If the store is the same of main store will return a IllegalAttributeException
|
138 |
*
|
139 |
* @param store
|
140 |
* @param band
|
141 |
* @throws DataException
|
142 |
*/
|
143 |
public void addBand(RasterStore store, int band) throws DataException; |
144 |
|
145 |
/**
|
146 |
* Add a list of bands from other store.
|
147 |
* If the store is the same of main store will return a IllegalAttributeException
|
148 |
*
|
149 |
* @param store
|
150 |
* @param bands
|
151 |
* @throws DataException
|
152 |
*/
|
153 |
public void addBands(RasterStore store, List<Integer> bands) throws DataException; |
154 |
|
155 |
/**
|
156 |
* Remove a band.
|
157 |
* If band belongs to main store, will return a IllegalAttributeException
|
158 |
*
|
159 |
* @param band
|
160 |
*/
|
161 |
public void removeBand(int band); |
162 |
|
163 |
/**
|
164 |
* Remove any band that does not belong to itself.
|
165 |
*/
|
166 |
public void clearAdditionalBands(); |
167 |
|
168 |
/**
|
169 |
* Return true if the band is own. If the band is from additional store, return false.
|
170 |
*
|
171 |
* @param band
|
172 |
* @return
|
173 |
*/
|
174 |
public boolean isOwnBand(int band); |
175 |
|
176 |
/**
|
177 |
* Return the buffer dimensions of the complete store.
|
178 |
* @return
|
179 |
* @throws InitializeException
|
180 |
*/
|
181 |
public BufferDimensions getDimensions() throws InitializeException; |
182 |
|
183 |
public boolean isTiled(); |
184 |
|
185 |
void getRasterSet(Observer observer) throws DataException; |
186 |
|
187 |
void getRasterSet(RasterQuery dataQuery, Observer observer) throws DataException; |
188 |
|
189 |
|
190 |
|
191 |
} |