Revision 6344
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.app/org.gvsig.raster.tilecache.app.mainplugin/src/main/java/org/gvsig/raster/tilecache/app/mainplugin/AddTestRasterLayerExtension.java | ||
---|---|---|
1 |
package org.gvsig.raster.tilecache.app.mainplugin; |
|
2 |
|
|
3 |
import java.io.File; |
|
4 |
|
|
5 |
import org.slf4j.Logger; |
|
6 |
import org.slf4j.LoggerFactory; |
|
7 |
|
|
8 |
import org.gvsig.andami.IconThemeHelper; |
|
9 |
import org.gvsig.andami.plugins.Extension; |
|
10 |
import org.gvsig.app.ApplicationLocator; |
|
11 |
import org.gvsig.app.ApplicationManager; |
|
12 |
import org.gvsig.app.project.documents.view.ViewDocument; |
|
13 |
import org.gvsig.app.project.documents.view.gui.IView; |
|
14 |
import org.gvsig.fmap.crs.CRSFactory; |
|
15 |
import org.gvsig.fmap.dal.DALLocator; |
|
16 |
import org.gvsig.fmap.dal.DataManager; |
|
17 |
import org.gvsig.fmap.dal.DataServerExplorer; |
|
18 |
import org.gvsig.fmap.dal.DataServerExplorerParameters; |
|
19 |
import org.gvsig.fmap.dal.DataStore; |
|
20 |
import org.gvsig.fmap.dal.DataStoreProviderFactory; |
|
21 |
import org.gvsig.fmap.dal.exception.DataException; |
|
22 |
import org.gvsig.fmap.dal.exception.InitializeException; |
|
23 |
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException; |
|
24 |
import org.gvsig.fmap.dal.exception.ValidateDataParametersException; |
|
25 |
import org.gvsig.fmap.dal.raster.api.RasterStore; |
|
26 |
import org.gvsig.fmap.dal.raster.spi.NewRasterStoreParameters; |
|
27 |
import org.gvsig.fmap.dal.spi.DALSPILocator; |
|
28 |
import org.gvsig.fmap.dal.spi.DataManagerProviderServices; |
|
29 |
import org.gvsig.fmap.mapcontext.MapContext; |
|
30 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
|
31 |
import org.gvsig.fmap.mapcontext.MapContextManager; |
|
32 |
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException; |
|
33 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
34 |
import org.gvsig.fmap.mapcontrol.MapControl; |
|
35 |
import org.gvsig.raster.lib.buffer.api.Buffer; |
|
36 |
import org.gvsig.raster.lib.buffer.api.exceptions.BufferException; |
|
37 |
import org.gvsig.tools.dynobject.DynObject; |
|
38 |
|
|
39 |
/** |
|
40 |
* Class for test purpose only. It serves to load a test layer in the active View. |
|
41 |
* @author fdiaz |
|
42 |
* |
|
43 |
*/ |
|
44 |
public class AddTestRasterLayerExtension extends Extension { |
|
45 |
|
|
46 |
private static final Logger logger = LoggerFactory.getLogger(AddTestRasterLayerExtension.class); |
|
47 |
|
|
48 |
@Override |
|
49 |
public void initialize() { |
|
50 |
IconThemeHelper.registerIcon("action", "view-test-layer-add", this); |
|
51 |
} |
|
52 |
|
|
53 |
@Override |
|
54 |
public void execute(String actionCommand) { |
|
55 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
56 |
|
|
57 |
IView view = (IView) application.getActiveComponent(ViewDocument.class); |
|
58 |
if (view == null) { |
|
59 |
return; |
|
60 |
} |
|
61 |
ViewDocument document = view.getViewDocument(); |
|
62 |
|
|
63 |
MapControl mapControl = view.getMapControl(); |
|
64 |
|
|
65 |
final MapContextManager mapContextManager = MapContextLocator.getMapContextManager(); |
|
66 |
FLayer layer = null; |
|
67 |
DataManager dataManager = DALLocator.getDataManager(); |
|
68 |
DataStore dataStore = openTileCache(); |
|
69 |
String layerName = dataStore.getName(); |
|
70 |
try { |
|
71 |
layer = mapContextManager.createLayer(layerName, dataStore); |
|
72 |
} catch (LoadLayerException e) { |
|
73 |
logger.warn("Cant load test layer", e); |
|
74 |
} |
|
75 |
|
|
76 |
MapContext mapContext = mapControl.getMapContext(); |
|
77 |
mapContext.getLayers().add(layer); |
|
78 |
mapContext.callLegendChanged(); |
|
79 |
document.setModified(true); |
|
80 |
} |
|
81 |
|
|
82 |
@Override |
|
83 |
public boolean isEnabled() { |
|
84 |
return true; |
|
85 |
} |
|
86 |
|
|
87 |
@Override |
|
88 |
public boolean isVisible() { |
|
89 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
90 |
|
|
91 |
return application.getActiveComponent(ViewDocument.class) != null; |
|
92 |
} |
|
93 |
|
|
94 |
/** |
|
95 |
* TO TEST ONLY |
|
96 |
* |
|
97 |
* @return |
|
98 |
*/ |
|
99 |
private RasterStore openWMS() { |
|
100 |
DataManagerProviderServices manager = DALSPILocator.getDataManagerProviderServices(); |
|
101 |
DataStoreProviderFactory providerFactory = manager.getStoreProviderFactory("WMS"); |
|
102 |
DynObject params = providerFactory.createParameters(); |
|
103 |
|
|
104 |
if (params.getDynClass().getDynField("crs") != null) { |
|
105 |
params.setDynValue("crs", CRSFactory.getCRS("EPSG:23030")); |
|
106 |
} |
|
107 |
|
|
108 |
RasterStore store = null; |
|
109 |
try { |
|
110 |
store = (RasterStore) manager.openStore("WMS", params); |
|
111 |
} catch (ValidateDataParametersException | InitializeException | ProviderNotRegisteredException e) { |
|
112 |
logger.info("**** error opening store *****", e); |
|
113 |
} |
|
114 |
if (store != null) { |
|
115 |
logger.info("**** ??????? O.K !!!!!!! *****"); |
|
116 |
} else { |
|
117 |
logger.info("**** K.O ;_( *****"); |
|
118 |
} |
|
119 |
try { |
|
120 |
exportGTiff(store); |
|
121 |
} catch (ValidateDataParametersException | DataException | BufferException e) { |
|
122 |
logger.info("failed to copy"); |
|
123 |
} |
|
124 |
return store; |
|
125 |
|
|
126 |
} |
|
127 |
|
|
128 |
/** |
|
129 |
* TO TEST ONLY |
|
130 |
* |
|
131 |
* @return |
|
132 |
*/ |
|
133 |
private RasterStore openWCS() { |
|
134 |
DataManagerProviderServices manager = DALSPILocator.getDataManagerProviderServices(); |
|
135 |
DataStoreProviderFactory providerFactory = manager.getStoreProviderFactory("WCS"); |
|
136 |
DynObject params = providerFactory.createParameters(); |
|
137 |
|
|
138 |
if (params.getDynClass().getDynField("url") != null) { |
|
139 |
params.setDynValue("url", "http://inspire.cop.gva.es/mapserver/wcs?"); |
|
140 |
} |
|
141 |
if (params.getDynClass().getDynField("coverage") != null) { |
|
142 |
params.setDynValue("coverage", "MDT"); |
|
143 |
} |
|
144 |
if (params.getDynClass().getDynField("crs") != null) { |
|
145 |
params.setDynValue("crs", CRSFactory.getCRS("EPSG:23030")); |
|
146 |
} |
|
147 |
|
|
148 |
RasterStore store = null; |
|
149 |
try { |
|
150 |
store = (RasterStore) manager.openStore("WCS", params); |
|
151 |
} catch (ValidateDataParametersException | InitializeException | ProviderNotRegisteredException e) { |
|
152 |
logger.info("**** error opening store *****", e); |
|
153 |
} |
|
154 |
if (store != null) { |
|
155 |
logger.info("**** ??????? O.K !!!!!!! *****"); |
|
156 |
} else { |
|
157 |
logger.info("**** K.O ;_( *****"); |
|
158 |
} |
|
159 |
try { |
|
160 |
exportGTiff(store); |
|
161 |
} catch (ValidateDataParametersException | DataException | BufferException e) { |
|
162 |
logger.info("failed to copy"); |
|
163 |
} |
|
164 |
return store; |
|
165 |
|
|
166 |
} |
|
167 |
|
|
168 |
/** |
|
169 |
* TO TEST ONLY |
|
170 |
* |
|
171 |
* @return |
|
172 |
*/ |
|
173 |
private RasterStore openPOSTGIS() { |
|
174 |
DataManagerProviderServices manager = DALSPILocator.getDataManagerProviderServices(); |
|
175 |
DataStoreProviderFactory providerFactory = manager.getStoreProviderFactory("PostGISRaster"); |
|
176 |
DynObject params = providerFactory.createParameters(); |
|
177 |
// PG:host='gvsig-training.com' port='5432' |
|
178 |
// dbname='andalucia' user='curso' password='curso' schema='public' |
|
179 |
// table='tr_relieve_andalucia2' |
|
180 |
if (params.getDynClass().getDynField("host") != null) { |
|
181 |
params.setDynValue("host", "gvsig-training.com"); |
|
182 |
} |
|
183 |
if (params.getDynClass().getDynField("dbname") != null) { |
|
184 |
params.setDynValue("dbname", "andalucia"); |
|
185 |
} |
|
186 |
if (params.getDynClass().getDynField("table") != null) { |
|
187 |
params.setDynValue("table", "tr_relieve_andalucia2"); |
|
188 |
} |
|
189 |
if (params.getDynClass().getDynField("schema") != null) { |
|
190 |
params.setDynValue("schema", "public"); |
|
191 |
} |
|
192 |
if (params.getDynClass().getDynField("user") != null) { |
|
193 |
params.setDynValue("user", "curso"); |
|
194 |
} |
|
195 |
if (params.getDynClass().getDynField("password") != null) { |
|
196 |
params.setDynValue("password", "curso"); |
|
197 |
} |
|
198 |
if (params.getDynClass().getDynField("port") != null) { |
|
199 |
params.setDynValue("port", 5432); |
|
200 |
} |
|
201 |
if (params.getDynClass().getDynField("crs") != null) { |
|
202 |
params.setDynValue("crs", CRSFactory.getCRS("EPSG:23030")); |
|
203 |
} |
|
204 |
|
|
205 |
RasterStore store = null; |
|
206 |
try { |
|
207 |
store = (RasterStore) manager.openStore("PostGISRaster", params); |
|
208 |
} catch (ValidateDataParametersException | InitializeException | ProviderNotRegisteredException e) { |
|
209 |
logger.info("**** error opening store *****", e); |
|
210 |
} |
|
211 |
if (store != null) { |
|
212 |
logger.info("**** ??????? O.K !!!!!!! *****"); |
|
213 |
} else { |
|
214 |
logger.info("**** K.O ;_( *****"); |
|
215 |
} |
|
216 |
try { |
|
217 |
exportPNG(store); |
|
218 |
} catch (ValidateDataParametersException | DataException | BufferException e) { |
|
219 |
logger.info("failed to copy"); |
|
220 |
} |
|
221 |
return store; |
|
222 |
|
|
223 |
} |
|
224 |
|
|
225 |
/** |
|
226 |
* TO TEST ONLY |
|
227 |
* |
|
228 |
* @return |
|
229 |
*/ |
|
230 |
private RasterStore openTileCache() { |
|
231 |
DataManagerProviderServices manager = DALSPILocator.getDataManagerProviderServices(); |
|
232 |
DataStoreProviderFactory providerFactory = manager.getStoreProviderFactory("TileCache"); |
|
233 |
DynObject params = providerFactory.createParameters(); |
|
234 |
|
|
235 |
if (params.getDynClass().getDynField("name") != null) { |
|
236 |
params.setDynValue("name", "TilecacheTEST"); |
|
237 |
} |
|
238 |
if (params.getDynClass().getDynField("crs") != null) { |
|
239 |
params.setDynValue("crs", CRSFactory.getCRS("EPSG:25830")); |
|
240 |
} |
|
241 |
|
|
242 |
RasterStore store = null; |
|
243 |
try { |
|
244 |
store = (RasterStore) manager.openStore("TileCache", params); |
|
245 |
} catch (ValidateDataParametersException | InitializeException | ProviderNotRegisteredException e) { |
|
246 |
logger.info("**** error opening store *****", e); |
|
247 |
} |
|
248 |
if (store != null) { |
|
249 |
logger.info("**** ??????? O.K !!!!!!! *****"); |
|
250 |
} else { |
|
251 |
logger.info("**** K.O ;_( *****"); |
|
252 |
} |
|
253 |
// try { |
|
254 |
// exportGTiff(store); |
|
255 |
// } catch (ValidateDataParametersException | DataException |
|
256 |
// | BufferException e) { |
|
257 |
// logger.info("failed to copy"); |
|
258 |
// } |
|
259 |
return store; |
|
260 |
} |
|
261 |
|
|
262 |
/** |
|
263 |
* TO TEST ONLY |
|
264 |
* |
|
265 |
* @return |
|
266 |
*/ |
|
267 |
private void exportPNG(RasterStore store) throws InitializeException, ProviderNotRegisteredException, |
|
268 |
ValidateDataParametersException, DataException, BufferException { |
|
269 |
String providerName = "PNG"; |
|
270 |
String extension = "png"; |
|
271 |
|
|
272 |
DataManagerProviderServices manager = DALSPILocator.getDataManagerProviderServices(); |
|
273 |
DataServerExplorerParameters eparams = manager.createServerExplorerParameters("FilesystemExplorer"); |
|
274 |
int count = 0; |
|
275 |
String path = "/home/daniel/pruebas/datosPruebaRaster/copiedFile." + extension; |
|
276 |
File destFile = new File(path); |
|
277 |
while (destFile.exists()) { |
|
278 |
count++; |
|
279 |
path = "/home/daniel/pruebas/datosPruebaRaster/copiedFile_" + count + "." + extension; |
|
280 |
destFile = new File(path); |
|
281 |
} |
|
282 |
eparams.setDynValue("initialpath", path); |
|
283 |
DataServerExplorer serverExplorer = manager.createServerExplorer(eparams); |
|
284 |
|
|
285 |
NewRasterStoreParameters params = (NewRasterStoreParameters) serverExplorer.getAddParameters(providerName); |
|
286 |
params.setDynValue("file", destFile); |
|
287 |
|
|
288 |
params.setDynValue("worldfile", false); |
|
289 |
params.setDynValue("zlevel", 1); |
|
290 |
|
|
291 |
Buffer buffer = store.getRasterSet().clip(store.getEnvelope()); |
|
292 |
params.setBuffer(buffer); |
|
293 |
serverExplorer.add(providerName, params, true); |
|
294 |
} |
|
295 |
|
|
296 |
/** |
|
297 |
* TO TEST ONLY |
|
298 |
* |
|
299 |
* @return |
|
300 |
*/ |
|
301 |
private void exportGTiff(RasterStore store) throws InitializeException, ProviderNotRegisteredException, |
|
302 |
ValidateDataParametersException, DataException, BufferException { |
|
303 |
String providerName = "GTiff"; |
|
304 |
String extension = "tif"; |
|
305 |
|
|
306 |
DataManagerProviderServices manager = DALSPILocator.getDataManagerProviderServices(); |
|
307 |
DataServerExplorerParameters eparams = manager.createServerExplorerParameters("FilesystemExplorer"); |
|
308 |
int count = 0; |
|
309 |
String path = "/home/daniel/pruebas/datosPruebaRaster/copiedFile." + extension; |
|
310 |
File destFile = new File(path); |
|
311 |
while (destFile.exists()) { |
|
312 |
count++; |
|
313 |
path = "/home/daniel/pruebas/datosPruebaRaster/copiedFile_" + count + "." + extension; |
|
314 |
destFile = new File(path); |
|
315 |
} |
|
316 |
eparams.setDynValue("initialpath", path); |
|
317 |
DataServerExplorer serverExplorer = manager.createServerExplorer(eparams); |
|
318 |
|
|
319 |
NewRasterStoreParameters params = (NewRasterStoreParameters) serverExplorer.getAddParameters(providerName); |
|
320 |
params.setDynValue("file", destFile); |
|
321 |
|
|
322 |
params.setDynValue("compress", "NONE"); |
|
323 |
params.setDynValue("tfw", false); |
|
324 |
params.setDynValue("photometric", "RGB"); |
|
325 |
|
|
326 |
Buffer buffer = store.getRasterSet().clip(store.getEnvelope()); |
|
327 |
params.setBuffer(buffer); |
|
328 |
serverExplorer.add(providerName, params, true); |
|
329 |
} |
|
330 |
|
|
331 |
/** |
|
332 |
* TO TEST ONLY |
|
333 |
* |
|
334 |
* @return |
|
335 |
*/ |
|
336 |
private void exportBMP(RasterStore store) throws InitializeException, ProviderNotRegisteredException, |
|
337 |
ValidateDataParametersException, DataException, BufferException { |
|
338 |
String providerName = "BMP"; |
|
339 |
String extension = "bmp"; |
|
340 |
|
|
341 |
DataManagerProviderServices manager = DALSPILocator.getDataManagerProviderServices(); |
|
342 |
DataServerExplorerParameters eparams = manager.createServerExplorerParameters("FilesystemExplorer"); |
|
343 |
int count = 0; |
|
344 |
String path = "/home/daniel/pruebas/datosPruebaRaster/copiedFile." + extension; |
|
345 |
File destFile = new File(path); |
|
346 |
while (destFile.exists()) { |
|
347 |
count++; |
|
348 |
path = "/home/daniel/pruebas/datosPruebaRaster/copiedFile_" + count + "." + extension; |
|
349 |
destFile = new File(path); |
|
350 |
} |
|
351 |
eparams.setDynValue("initialpath", path); |
|
352 |
DataServerExplorer serverExplorer = manager.createServerExplorer(eparams); |
|
353 |
|
|
354 |
NewRasterStoreParameters params = (NewRasterStoreParameters) serverExplorer.getAddParameters(providerName); |
|
355 |
params.setDynValue("file", destFile); |
|
356 |
|
|
357 |
params.setDynValue("worldfile", true); |
|
358 |
|
|
359 |
Buffer buffer = store.getRasterSet().clip(store.getEnvelope()); |
|
360 |
params.setBuffer(buffer); |
|
361 |
serverExplorer.add(providerName, params, true); |
|
362 |
} |
|
363 |
|
|
364 |
/** |
|
365 |
* TO TEST ONLY |
|
366 |
* |
|
367 |
* @return |
|
368 |
*/ |
|
369 |
private void exportNetCDF(RasterStore store) throws InitializeException, ProviderNotRegisteredException, |
|
370 |
ValidateDataParametersException, DataException, BufferException { |
|
371 |
String providerName = "netCDF"; |
|
372 |
String extension = "nc"; |
|
373 |
|
|
374 |
DataManagerProviderServices manager = DALSPILocator.getDataManagerProviderServices(); |
|
375 |
DataServerExplorerParameters eparams = manager.createServerExplorerParameters("FilesystemExplorer"); |
|
376 |
int count = 0; |
|
377 |
String path = "/home/daniel/pruebas/datosPruebaRaster/copiedFile." + extension; |
|
378 |
File destFile = new File(path); |
|
379 |
while (destFile.exists()) { |
|
380 |
count++; |
|
381 |
path = "/home/daniel/pruebas/datosPruebaRaster/copiedFile_" + count + "." + extension; |
|
382 |
destFile = new File(path); |
|
383 |
} |
|
384 |
eparams.setDynValue("initialpath", path); |
|
385 |
DataServerExplorer serverExplorer = manager.createServerExplorer(eparams); |
|
386 |
|
|
387 |
NewRasterStoreParameters params = (NewRasterStoreParameters) serverExplorer.getAddParameters(providerName); |
|
388 |
params.setDynValue("file", destFile); |
|
389 |
// params.setDynValue("format", "NC4C"); |
|
390 |
// params.setDynValue("pixeltype", "DEFAULT"); |
|
391 |
params.setDynValue("chunking", false); |
|
392 |
|
|
393 |
Buffer buffer = store.getRasterSet().clip(store.getEnvelope()); |
|
394 |
params.setBuffer(buffer); |
|
395 |
serverExplorer.add(providerName, params, true); |
|
396 |
} |
|
397 |
|
|
398 |
} |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.app/org.gvsig.raster.tilecache.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
8 | 8 |
<extension class-name="org.gvsig.raster.tilecache.app.mainplugin.TileCacheExtension" |
9 | 9 |
description="Tile cache Raster Provider" active="true" priority="1"> |
10 | 10 |
</extension> |
11 |
<extension class-name="org.gvsig.raster.tilecache.app.mainplugin.AddTestRasterLayerExtension" |
|
12 |
description="Add test raster layer extension" |
|
13 |
active="true" |
|
14 |
priority="25"> |
|
15 |
<action |
|
16 |
name="view-test-layer-add" |
|
17 |
label="Add_test_layer" |
|
18 |
tooltip="Add_test_layer" |
|
19 |
action-command="view-test-layer-add" |
|
20 |
icon="view-test-layer-add" |
|
21 |
position="650300005" |
|
22 |
accelerator="Alt+?" |
|
23 |
/> |
|
24 |
|
|
25 |
<menu |
|
26 |
name="view-test-layer-add" |
|
27 |
text="View/Add_test_layer" |
|
28 |
/> |
|
29 |
<tool-bar name="view" position="30015"> |
|
30 |
<action-tool name="view-test-layer-add"/> |
|
31 |
</tool-bar> |
|
32 |
|
|
33 |
</extension> |
|
11 | 34 |
</extensions> |
12 | 35 |
</plugin-config> |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.fmap.mapcontext.raster/org.gvsig.fmap.mapcontext.raster.impl/src/main/java/org/gvsig/fmap/mapcontext/raster/impl/DefaultRasterLayer.java | ||
---|---|---|
24 | 24 |
|
25 | 25 |
import java.awt.Graphics2D; |
26 | 26 |
import java.awt.image.BufferedImage; |
27 |
import java.io.File; |
|
28 | 27 |
import java.util.Observable; |
29 | 28 |
import java.util.Observer; |
30 | 29 |
import java.util.Set; |
31 | 30 |
import java.util.TreeSet; |
32 | 31 |
|
33 | 32 |
import org.cresques.cts.ICoordTrans; |
33 |
import org.slf4j.LoggerFactory; |
|
34 |
|
|
34 | 35 |
import org.gvsig.compat.print.PrintAttributes; |
35 |
import org.gvsig.fmap.crs.CRSFactory; |
|
36 |
import org.gvsig.fmap.dal.DataServerExplorer; |
|
37 |
import org.gvsig.fmap.dal.DataServerExplorerParameters; |
|
38 | 36 |
import org.gvsig.fmap.dal.DataStore; |
39 |
import org.gvsig.fmap.dal.DataStoreProviderFactory; |
|
40 | 37 |
import org.gvsig.fmap.dal.exception.DataException; |
41 |
import org.gvsig.fmap.dal.exception.InitializeException; |
|
42 |
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException; |
|
43 | 38 |
import org.gvsig.fmap.dal.exception.ReadException; |
44 |
import org.gvsig.fmap.dal.exception.ValidateDataParametersException; |
|
45 | 39 |
import org.gvsig.fmap.dal.raster.api.RasterQuery; |
46 | 40 |
import org.gvsig.fmap.dal.raster.api.RasterStore; |
47 | 41 |
import org.gvsig.fmap.dal.raster.api.RasterStoreNotification; |
48 |
import org.gvsig.fmap.dal.raster.spi.NewRasterStoreParameters; |
|
49 |
import org.gvsig.fmap.dal.spi.DALSPILocator; |
|
50 |
import org.gvsig.fmap.dal.spi.DataManagerProviderServices; |
|
51 | 42 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
52 | 43 |
import org.gvsig.fmap.geom.GeometryLocator; |
53 | 44 |
import org.gvsig.fmap.geom.GeometryManager; |
... | ... | |
60 | 51 |
import org.gvsig.fmap.mapcontext.raster.api.RasterLayer; |
61 | 52 |
import org.gvsig.fmap.mapcontext.raster.api.RasterLegendChangedListener; |
62 | 53 |
import org.gvsig.metadata.exceptions.MetadataException; |
63 |
import org.gvsig.raster.lib.buffer.api.Buffer; |
|
64 |
import org.gvsig.raster.lib.buffer.api.exceptions.BufferException; |
|
65 | 54 |
import org.gvsig.raster.lib.legend.api.ColorInterpretation; |
66 | 55 |
import org.gvsig.raster.lib.legend.api.RasterLegend; |
67 | 56 |
import org.gvsig.tools.ToolsLocator; |
68 | 57 |
import org.gvsig.tools.dispose.DisposeUtils; |
69 |
import org.gvsig.tools.dynobject.DynObject; |
|
70 | 58 |
import org.gvsig.tools.dynobject.exception.DynMethodException; |
71 | 59 |
import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException; |
72 | 60 |
import org.gvsig.tools.exception.BaseException; |
73 | 61 |
import org.gvsig.tools.task.Cancellable; |
74 | 62 |
import org.gvsig.tools.task.SimpleTaskStatus; |
75 | 63 |
import org.gvsig.tools.task.TaskStatusManager; |
76 |
import org.slf4j.LoggerFactory; |
|
77 | 64 |
|
78 | 65 |
/** |
79 | 66 |
* Capa b?sica Raster. |
... | ... | |
86 | 73 |
|
87 | 74 |
private RasterStore store; |
88 | 75 |
private RasterLegend legend; |
89 |
//TODO remove labeled |
|
90 |
//private boolean isLabeled; |
|
91 |
//protected ILabelingStrategy strategy; |
|
92 | 76 |
//private Cancellable cancel; |
93 | 77 |
private RasterQuery baseQuery; |
94 | 78 |
|
... | ... | |
159 | 143 |
DisposeUtils.disposeQuietly(this.store); |
160 | 144 |
} |
161 | 145 |
|
162 |
//this.store = (RasterStore) dataStore; |
|
163 |
//FIXME |
|
164 |
this.store=openTileCache(); |
|
165 |
//FIXME:To test only |
|
166 |
try { |
|
167 |
copyStoreTestMethod (this.store); |
|
168 |
} catch (Exception e) { |
|
169 |
// TODO Auto-generated catch block |
|
170 |
e.printStackTrace(); |
|
171 |
} |
|
146 |
this.store = (RasterStore) dataStore; |
|
172 | 147 |
ToolsLocator.getDisposableManager().bind(dataStore); |
173 | 148 |
initLegend(); |
174 | 149 |
} |
175 | 150 |
|
176 | 151 |
/** |
177 |
* To test only |
|
178 |
* @param store |
|
179 |
* @throws ValidateDataParametersException |
|
180 |
* @throws DataException |
|
181 |
* @throws BufferException |
|
182 |
*/ |
|
183 |
private void copyStoreTestMethod(RasterStore store) throws Exception{ |
|
184 |
//FIXME: To test only. Remove afterwards |
|
185 |
// exportGTiff(store); |
|
186 |
// exportBMP(store); |
|
187 |
// exportNetCDF(store); |
|
188 |
// exportPNG(store); |
|
189 |
// openPOSTGIS(); |
|
190 |
// openWCS(); |
|
191 |
// openWMS(); |
|
192 |
// openTileCache(); |
|
193 |
} |
|
194 |
|
|
195 |
|
|
196 |
/** |
|
197 |
* TO TEST ONLY |
|
198 |
* @return |
|
199 |
*/ |
|
200 |
private RasterStore openTileCache(){ |
|
201 |
DataManagerProviderServices manager=DALSPILocator.getDataManagerProviderServices(); |
|
202 |
DataStoreProviderFactory providerFactory = manager.getStoreProviderFactory("TileCache"); |
|
203 |
DynObject params = providerFactory.createParameters(); |
|
204 |
|
|
205 |
if (params.getDynClass().getDynField("name")!=null){ |
|
206 |
params.setDynValue("name", "TilecacheTEST"); |
|
207 |
} |
|
208 |
if (params.getDynClass().getDynField("crs")!=null){ |
|
209 |
params.setDynValue("crs", CRSFactory.getCRS("EPSG:23030")); |
|
210 |
} |
|
211 |
|
|
212 |
RasterStore store=null; |
|
213 |
try { |
|
214 |
store = (RasterStore) manager.openStore("TileCache",params); |
|
215 |
} catch (ValidateDataParametersException | InitializeException |
|
216 |
| ProviderNotRegisteredException e) { |
|
217 |
logger.info("**** error opening store *****", e); |
|
218 |
} |
|
219 |
if (store!=null){ |
|
220 |
logger.info("**** ??????? O.K !!!!!!! *****"); |
|
221 |
}else{ |
|
222 |
logger.info("**** K.O ;_( *****"); |
|
223 |
} |
|
224 |
// try { |
|
225 |
// exportGTiff(store); |
|
226 |
// } catch (ValidateDataParametersException | DataException |
|
227 |
// | BufferException e) { |
|
228 |
// logger.info("failed to copy"); |
|
229 |
// } |
|
230 |
return store; |
|
231 |
|
|
232 |
} |
|
233 |
|
|
234 |
|
|
235 |
/** |
|
236 |
* TO TEST ONLY |
|
237 |
* @return |
|
238 |
*/ |
|
239 |
private RasterStore openWMS(){ |
|
240 |
DataManagerProviderServices manager=DALSPILocator.getDataManagerProviderServices(); |
|
241 |
DataStoreProviderFactory providerFactory = manager.getStoreProviderFactory("WMS"); |
|
242 |
DynObject params = providerFactory.createParameters(); |
|
243 |
|
|
244 |
if (params.getDynClass().getDynField("crs")!=null){ |
|
245 |
params.setDynValue("crs", CRSFactory.getCRS("EPSG:23030")); |
|
246 |
} |
|
247 |
|
|
248 |
RasterStore store=null; |
|
249 |
try { |
|
250 |
store = (RasterStore) manager.openStore("WMS",params); |
|
251 |
} catch (ValidateDataParametersException | InitializeException |
|
252 |
| ProviderNotRegisteredException e) { |
|
253 |
logger.info("**** error opening store *****", e); |
|
254 |
} |
|
255 |
if (store!=null){ |
|
256 |
logger.info("**** ??????? O.K !!!!!!! *****"); |
|
257 |
}else{ |
|
258 |
logger.info("**** K.O ;_( *****"); |
|
259 |
} |
|
260 |
try { |
|
261 |
exportGTiff(store); |
|
262 |
} catch (ValidateDataParametersException | DataException |
|
263 |
| BufferException e) { |
|
264 |
logger.info("failed to copy"); |
|
265 |
} |
|
266 |
return store; |
|
267 |
|
|
268 |
} |
|
269 |
|
|
270 |
/** |
|
271 |
* TO TEST ONLY |
|
272 |
* @return |
|
273 |
*/ |
|
274 |
private RasterStore openWCS(){ |
|
275 |
DataManagerProviderServices manager=DALSPILocator.getDataManagerProviderServices(); |
|
276 |
DataStoreProviderFactory providerFactory = manager.getStoreProviderFactory("WCS"); |
|
277 |
DynObject params = providerFactory.createParameters(); |
|
278 |
|
|
279 |
if (params.getDynClass().getDynField("url")!=null){ |
|
280 |
params.setDynValue("url", "http://inspire.cop.gva.es/mapserver/wcs?"); |
|
281 |
} |
|
282 |
if (params.getDynClass().getDynField("coverage")!=null){ |
|
283 |
params.setDynValue("coverage", "MDT"); |
|
284 |
} |
|
285 |
if (params.getDynClass().getDynField("crs")!=null){ |
|
286 |
params.setDynValue("crs", CRSFactory.getCRS("EPSG:23030")); |
|
287 |
} |
|
288 |
|
|
289 |
RasterStore store=null; |
|
290 |
try { |
|
291 |
store = (RasterStore) manager.openStore("WCS",params); |
|
292 |
} catch (ValidateDataParametersException | InitializeException |
|
293 |
| ProviderNotRegisteredException e) { |
|
294 |
logger.info("**** error opening store *****", e); |
|
295 |
} |
|
296 |
if (store!=null){ |
|
297 |
logger.info("**** ??????? O.K !!!!!!! *****"); |
|
298 |
}else{ |
|
299 |
logger.info("**** K.O ;_( *****"); |
|
300 |
} |
|
301 |
try { |
|
302 |
exportGTiff(store); |
|
303 |
} catch (ValidateDataParametersException | DataException |
|
304 |
| BufferException e) { |
|
305 |
logger.info("failed to copy"); |
|
306 |
} |
|
307 |
return store; |
|
308 |
|
|
309 |
} |
|
310 |
|
|
311 |
/** |
|
312 |
* TO TEST ONLY |
|
313 |
* @return |
|
314 |
*/ |
|
315 |
private RasterStore openPOSTGIS(){ |
|
316 |
DataManagerProviderServices manager=DALSPILocator.getDataManagerProviderServices(); |
|
317 |
DataStoreProviderFactory providerFactory = manager.getStoreProviderFactory("PostGISRaster"); |
|
318 |
DynObject params = providerFactory.createParameters(); |
|
319 |
//PG:host='gvsig-training.com' port='5432' |
|
320 |
//dbname='andalucia' user='curso' password='curso' schema='public' table='tr_relieve_andalucia2' |
|
321 |
if (params.getDynClass().getDynField("host")!=null){ |
|
322 |
params.setDynValue("host", "gvsig-training.com"); |
|
323 |
} |
|
324 |
if (params.getDynClass().getDynField("dbname")!=null){ |
|
325 |
params.setDynValue("dbname", "andalucia"); |
|
326 |
} |
|
327 |
if (params.getDynClass().getDynField("table")!=null){ |
|
328 |
params.setDynValue("table", "tr_relieve_andalucia2"); |
|
329 |
} |
|
330 |
if (params.getDynClass().getDynField("schema")!=null){ |
|
331 |
params.setDynValue("schema", "public"); |
|
332 |
} |
|
333 |
if (params.getDynClass().getDynField("user")!=null){ |
|
334 |
params.setDynValue("user", "curso"); |
|
335 |
} |
|
336 |
if (params.getDynClass().getDynField("password")!=null){ |
|
337 |
params.setDynValue("password", "curso"); |
|
338 |
} |
|
339 |
if (params.getDynClass().getDynField("port")!=null){ |
|
340 |
params.setDynValue("port", 5432); |
|
341 |
} |
|
342 |
if (params.getDynClass().getDynField("crs")!=null){ |
|
343 |
params.setDynValue("crs", CRSFactory.getCRS("EPSG:23030")); |
|
344 |
} |
|
345 |
|
|
346 |
RasterStore store=null; |
|
347 |
try { |
|
348 |
store = (RasterStore) manager.openStore("PostGISRaster",params); |
|
349 |
} catch (ValidateDataParametersException | InitializeException |
|
350 |
| ProviderNotRegisteredException e) { |
|
351 |
logger.info("**** error opening store *****", e); |
|
352 |
} |
|
353 |
if (store!=null){ |
|
354 |
logger.info("**** ??????? O.K !!!!!!! *****"); |
|
355 |
}else{ |
|
356 |
logger.info("**** K.O ;_( *****"); |
|
357 |
} |
|
358 |
try { |
|
359 |
exportPNG(store); |
|
360 |
} catch (ValidateDataParametersException | DataException |
|
361 |
| BufferException e) { |
|
362 |
logger.info("failed to copy"); |
|
363 |
} |
|
364 |
return store; |
|
365 |
|
|
366 |
} |
|
367 |
|
|
368 |
/** |
|
369 |
* TO TEST ONLY |
|
370 |
* @return |
|
371 |
*/ |
|
372 |
private void exportPNG(RasterStore store) |
|
373 |
throws InitializeException, ProviderNotRegisteredException, |
|
374 |
ValidateDataParametersException, DataException, BufferException { |
|
375 |
String providerName="PNG"; |
|
376 |
String extension="png"; |
|
377 |
|
|
378 |
DataManagerProviderServices manager=DALSPILocator.getDataManagerProviderServices(); |
|
379 |
DataServerExplorerParameters eparams = manager.createServerExplorerParameters("FilesystemExplorer"); |
|
380 |
int count = 0; |
|
381 |
String path = "/home/daniel/pruebas/datosPruebaRaster/copiedFile."+extension; |
|
382 |
File destFile=new File(path); |
|
383 |
while(destFile.exists()){ |
|
384 |
count++; |
|
385 |
path = "/home/daniel/pruebas/datosPruebaRaster/copiedFile_"+count+"."+extension; |
|
386 |
destFile=new File(path); |
|
387 |
} |
|
388 |
eparams.setDynValue("initialpath",path); |
|
389 |
DataServerExplorer serverExplorer= manager.createServerExplorer(eparams); |
|
390 |
|
|
391 |
NewRasterStoreParameters params =(NewRasterStoreParameters) serverExplorer.getAddParameters(providerName); |
|
392 |
params.setDynValue("file",destFile); |
|
393 |
|
|
394 |
params.setDynValue("worldfile", false); |
|
395 |
params.setDynValue("zlevel", 1); |
|
396 |
|
|
397 |
Buffer buffer=store.getRasterSet().clip(store.getEnvelope()); |
|
398 |
params.setBuffer(buffer); |
|
399 |
serverExplorer.add(providerName, params, true); |
|
400 |
} |
|
401 |
|
|
402 |
/** |
|
403 |
* TO TEST ONLY |
|
404 |
* @return |
|
405 |
*/ |
|
406 |
private void exportGTiff(RasterStore store) |
|
407 |
throws InitializeException, ProviderNotRegisteredException, |
|
408 |
ValidateDataParametersException, DataException, BufferException { |
|
409 |
String providerName="GTiff"; |
|
410 |
String extension="tif"; |
|
411 |
|
|
412 |
DataManagerProviderServices manager=DALSPILocator.getDataManagerProviderServices(); |
|
413 |
DataServerExplorerParameters eparams = manager.createServerExplorerParameters("FilesystemExplorer"); |
|
414 |
int count = 0; |
|
415 |
String path = "/home/daniel/pruebas/datosPruebaRaster/copiedFile."+extension; |
|
416 |
File destFile=new File(path); |
|
417 |
while(destFile.exists()){ |
|
418 |
count++; |
|
419 |
path = "/home/daniel/pruebas/datosPruebaRaster/copiedFile_"+count+"."+extension; |
|
420 |
destFile=new File(path); |
|
421 |
} |
|
422 |
eparams.setDynValue("initialpath",path); |
|
423 |
DataServerExplorer serverExplorer= manager.createServerExplorer(eparams); |
|
424 |
|
|
425 |
NewRasterStoreParameters params =(NewRasterStoreParameters) serverExplorer.getAddParameters(providerName); |
|
426 |
params.setDynValue("file",destFile); |
|
427 |
|
|
428 |
|
|
429 |
params.setDynValue("compress", "NONE"); |
|
430 |
params.setDynValue("tfw", false); |
|
431 |
params.setDynValue("photometric", "RGB"); |
|
432 |
|
|
433 |
|
|
434 |
Buffer buffer=store.getRasterSet().clip(store.getEnvelope()); |
|
435 |
params.setBuffer(buffer); |
|
436 |
serverExplorer.add(providerName, params, true); |
|
437 |
} |
|
438 |
|
|
439 |
/** |
|
440 |
* TO TEST ONLY |
|
441 |
* @return |
|
442 |
*/ |
|
443 |
private void exportBMP(RasterStore store) |
|
444 |
throws InitializeException, ProviderNotRegisteredException, |
|
445 |
ValidateDataParametersException, DataException, BufferException { |
|
446 |
String providerName="BMP"; |
|
447 |
String extension="bmp"; |
|
448 |
|
|
449 |
DataManagerProviderServices manager=DALSPILocator.getDataManagerProviderServices(); |
|
450 |
DataServerExplorerParameters eparams = manager.createServerExplorerParameters("FilesystemExplorer"); |
|
451 |
int count = 0; |
|
452 |
String path = "/home/daniel/pruebas/datosPruebaRaster/copiedFile."+extension; |
|
453 |
File destFile=new File(path); |
|
454 |
while(destFile.exists()){ |
|
455 |
count++; |
|
456 |
path = "/home/daniel/pruebas/datosPruebaRaster/copiedFile_"+count+"."+extension; |
|
457 |
destFile=new File(path); |
|
458 |
} |
|
459 |
eparams.setDynValue("initialpath",path); |
|
460 |
DataServerExplorer serverExplorer= manager.createServerExplorer(eparams); |
|
461 |
|
|
462 |
NewRasterStoreParameters params =(NewRasterStoreParameters) serverExplorer.getAddParameters(providerName); |
|
463 |
params.setDynValue("file",destFile); |
|
464 |
|
|
465 |
|
|
466 |
params.setDynValue("worldfile", true); |
|
467 |
|
|
468 |
|
|
469 |
Buffer buffer=store.getRasterSet().clip(store.getEnvelope()); |
|
470 |
params.setBuffer(buffer); |
|
471 |
serverExplorer.add(providerName, params, true); |
|
472 |
} |
|
473 |
|
|
474 |
/** |
|
475 |
* TO TEST ONLY |
|
476 |
* @return |
|
477 |
*/ |
|
478 |
private void exportNetCDF(RasterStore store) |
|
479 |
throws InitializeException, ProviderNotRegisteredException, |
|
480 |
ValidateDataParametersException, DataException, BufferException { |
|
481 |
String providerName="netCDF"; |
|
482 |
String extension="nc"; |
|
483 |
|
|
484 |
DataManagerProviderServices manager=DALSPILocator.getDataManagerProviderServices(); |
|
485 |
DataServerExplorerParameters eparams = manager.createServerExplorerParameters("FilesystemExplorer"); |
|
486 |
int count = 0; |
|
487 |
String path = "/home/daniel/pruebas/datosPruebaRaster/copiedFile."+extension; |
|
488 |
File destFile=new File(path); |
|
489 |
while(destFile.exists()){ |
|
490 |
count++; |
|
491 |
path = "/home/daniel/pruebas/datosPruebaRaster/copiedFile_"+count+"."+extension; |
|
492 |
destFile=new File(path); |
|
493 |
} |
|
494 |
eparams.setDynValue("initialpath",path); |
|
495 |
DataServerExplorer serverExplorer= manager.createServerExplorer(eparams); |
|
496 |
|
|
497 |
NewRasterStoreParameters params =(NewRasterStoreParameters) serverExplorer.getAddParameters(providerName); |
|
498 |
params.setDynValue("file",destFile); |
|
499 |
//params.setDynValue("format", "NC4C"); |
|
500 |
// params.setDynValue("pixeltype", "DEFAULT"); |
|
501 |
params.setDynValue("chunking", false); |
|
502 |
|
|
503 |
Buffer buffer=store.getRasterSet().clip(store.getEnvelope()); |
|
504 |
params.setBuffer(buffer); |
|
505 |
serverExplorer.add(providerName, params, true); |
|
506 |
} |
|
507 |
|
|
508 |
/** |
|
509 | 152 |
* Initializes the legend if it is not initalized yet |
510 | 153 |
* @throws LegendLayerException |
511 | 154 |
*/ |
512 |
private void initLegend() throws LegendLayerException{ |
|
513 |
RasterLegend legend=null; |
|
514 |
if(this.legend==null){ |
|
515 |
//Should be done like this but must be corrected mapContextManager |
|
516 |
// MapContextManager mapContextManager |
|
517 |
// = MapContextLocator.getMapContextManager(); |
|
518 |
//Set the legend |
|
519 |
// IRasterLegend legend |
|
520 |
// = (IRasterLegend) mapContextManager.getLegend(store); |
|
155 |
private void initLegend() throws LegendLayerException { |
|
156 |
RasterLegend legend = null; |
|
157 |
if (this.legend == null) { |
|
158 |
// Should be done like this but must be corrected mapContextManager |
|
159 |
// MapContextManager mapContextManager = MapContextLocator.getMapContextManager(); |
|
160 |
// Set the legend |
|
161 |
// IRasterLegend legend = (IRasterLegend) mapContextManager.getLegend(store); |
|
521 | 162 |
|
522 |
|
|
523 |
//Should be moved to mapContextManager when RasterLegend implements ILegend
|
|
163 |
// Should be moved to mapContextManager when RasterLegend implements |
|
164 |
// ILegend |
|
524 | 165 |
if (legend == null) { |
525 |
try { |
|
166 |
try {
|
|
526 | 167 |
legend = (RasterLegend) store.invokeDynMethod(RasterStore.DYNMETHOD_GETLEGEND_NAME, null); |
527 |
} catch (DynMethodNotSupportedException e) { |
|
528 |
logger.debug("This store {} does not provide a legend.", |
|
529 |
store.getName()); |
|
530 |
} catch (DynMethodException e) { |
|
531 |
logger.error( |
|
532 |
"Can't load the specific legend provided for the store {}.", |
|
533 |
store.getName(), e); |
|
168 |
} catch (DynMethodNotSupportedException e) { |
|
169 |
logger.debug("This store {} does not provide a legend.", store.getName()); |
|
170 |
} catch (DynMethodException e) { |
|
171 |
logger.error("Can't load the specific legend provided for the store {}.", store.getName(), e); |
|
172 |
} |
|
534 | 173 |
} |
535 |
} |
|
536 | 174 |
|
537 |
|
|
538 | 175 |
if (legend == null) { |
539 | 176 |
throw new LegendLayerException(this.getName()); |
540 | 177 |
} |
... | ... | |
645 | 282 |
+ this.store.getMetadataID(); |
646 | 283 |
} |
647 | 284 |
|
648 |
// @Override |
|
649 |
// public boolean isLabeled() { |
|
650 |
// return isLabeled; |
|
651 |
// } |
|
652 |
// |
|
653 |
// @Override |
|
654 |
// public void setIsLabeled(boolean isLabeled) { |
|
655 |
// this.isLabeled = isLabeled; |
|
656 |
// } |
|
657 |
// |
|
658 |
// @Override |
|
659 |
// public ILabelingStrategy getLabelingStrategy() { |
|
660 |
// return strategy; |
|
661 |
// } |
|
662 |
// |
|
663 |
// @Override |
|
664 |
// public void setLabelingStrategy(ILabelingStrategy strategy) { |
|
665 |
// this.strategy = strategy; |
|
666 |
// if (strategy == null) { |
|
667 |
// return; |
|
668 |
// } |
|
669 |
// strategy.setLayer(this); |
|
670 |
// updateDrawVersion(); |
|
671 |
// } |
|
672 |
// |
|
673 |
// @Override |
|
674 |
// public void drawLabels(BufferedImage image, Graphics2D g, ViewPort viewPort, |
|
675 |
// Cancellable cancel, double scale, double dpi) throws ReadException { |
|
676 |
// if (strategy != null && isWithinScale(scale)) { |
|
677 |
// strategy.draw(image, g, scale, viewPort, cancel, dpi); |
|
678 |
// } |
|
679 |
// } |
|
680 |
// |
|
681 |
// @Override |
|
682 |
// public void printLabels(Graphics2D g, ViewPort viewPort, Cancellable cancel, |
|
683 |
// double scale, PrintAttributes properties) throws ReadException { |
|
684 |
// if (strategy != null) { |
|
685 |
// strategy.print(g, scale, viewPort, cancel, properties); |
|
686 |
// } |
|
687 |
// } |
|
688 |
|
|
689 |
|
|
690 | 285 |
@Override |
691 | 286 |
public void update(Observable observable, Object notification) { |
692 | 287 |
if (observable.equals(this.store)) { |
... | ... | |
704 | 299 |
} |
705 | 300 |
} |
706 | 301 |
|
707 |
// @Override |
|
708 |
// public boolean symbolChanged(SymbolLegendEvent e) { |
|
709 |
// throw new UnsupportedOperationException("Raster layers don't have default symbol"); |
|
710 |
//// this.updateDrawVersion(); |
|
711 |
//// LegendChangedEvent ev = LegendChangedEvent.createLegendChangedEvent(legend, e); |
|
712 |
//// this.callLegendChanged(ev); |
|
713 |
//// return true; |
|
714 |
// } |
|
715 |
// |
|
716 |
// @Override |
|
717 |
// public void legendCleared(LegendClearEvent event) { |
|
718 |
// this.updateDrawVersion(); |
|
719 |
// LegendChangedEvent e = LegendChangedEvent.createLegendChangedEvent(legend,event); |
|
720 |
// this.callLegendChanged(e); |
|
721 |
// } |
|
722 |
|
|
723 | 302 |
@Override |
724 | 303 |
public RasterStore getRasterStore() { |
725 | 304 |
return this.store; |
Also available in: Unified diff