Revision 1081
org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/tool/enhanced/ui/GraphicsPanel.java | ||
---|---|---|
93 | 93 |
|
94 | 94 |
} catch (ProcessInterruptedException e) { |
95 | 95 |
e.printStackTrace(); |
96 |
} catch (InterruptedException e) { |
|
97 |
e.printStackTrace(); |
|
98 | 96 |
} |
99 | 97 |
|
100 | 98 |
init(); |
org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/tool/enhanced/EnhancedTocMenuEntry.java | ||
---|---|---|
23 | 23 |
|
24 | 24 |
import javax.swing.Icon; |
25 | 25 |
|
26 |
import org.gvsig.andami.PluginServices; |
|
27 | 26 |
import org.gvsig.app.project.documents.view.toc.AbstractTocContextMenuAction; |
28 | 27 |
import org.gvsig.app.project.documents.view.toc.ITocItem; |
29 | 28 |
import org.gvsig.fmap.dal.coverage.datastruct.BufferHistogram; |
30 |
import org.gvsig.fmap.dal.coverage.exception.HistogramException; |
|
31 | 29 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
32 | 30 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
33 | 31 |
import org.gvsig.raster.fmap.layers.ILayerState; |
... | ... | |
159 | 157 |
if(param == null || param instanceof FLyrRaster) { |
160 | 158 |
HistogramProcess histogramProcess = new HistogramProcess(); |
161 | 159 |
histogramProcess.setActions(this); |
162 |
try { |
|
163 |
histogramProcess.addParam("histogramable", this.lyr.getDataStore().getHistogramComputer()); |
|
164 |
histogramProcess.start(); |
|
165 |
} catch (HistogramException e) { |
|
166 |
RasterToolsUtil.messageBoxError("error_computing_histogram", PluginServices.getMDIManager().getActiveWindow(), e); |
|
167 |
} catch (InterruptedException e) { |
|
168 |
} |
|
160 |
histogramProcess.addParam("histogramable", this.lyr.getDataStore().getHistogramComputer()); |
|
161 |
histogramProcess.start(); |
|
169 | 162 |
} |
170 | 163 |
if(param instanceof BufferHistogram) { |
171 | 164 |
EnhancedDialog enhancedDialog = new EnhancedDialog(lyr, 760, 421); |
org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/tool/viewexport/Export.java | ||
---|---|---|
312 | 312 |
public Buffer getSource() { |
313 | 313 |
return null; |
314 | 314 |
} |
315 |
|
|
316 |
public void setPercent(int value) { |
|
317 |
// TODO Auto-generated method stub |
|
318 |
|
|
319 |
} |
|
315 | 320 |
} |
316 | 321 |
|
317 | 322 |
class MyFileFilter extends FileFilter{ |
org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/tool/saveraster/operation/RasterizerLayer.java | ||
---|---|---|
338 | 338 |
// TODO Auto-generated method stub |
339 | 339 |
return null; |
340 | 340 |
} |
341 |
|
|
342 |
public void setPercent(int value) { |
|
343 |
// TODO Auto-generated method stub |
|
344 |
|
|
345 |
} |
|
341 | 346 |
} |
org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/tool/histogram/HistogramPanelListener.java | ||
---|---|---|
186 | 186 |
//Selecci?n de fuente de datos del histograma |
187 | 187 |
JComboBox cbo = getHistogramPanel().getComboBoxSource(); |
188 | 188 |
if (e.getSource() == cbo) { |
189 |
try { |
|
190 |
ArrayList comboSource = getHistogramPanel().getComboSource(); |
|
191 |
for (int i = 0; i < comboSource.size(); i++) { |
|
192 |
String name = (String) ((ArrayList) comboSource.get(i)).get(1); |
|
193 |
if (name.compareTo(RasterToolsUtil.getText(this, "datos_visualizados")) == 0) { |
|
194 |
((ArrayList) comboSource.get(i)).remove(0); |
|
195 |
((ArrayList) comboSource.get(i)).add(0, ((FLyrRaster) lyr).getRender().getLastRenderBuffer().getHistogramComputer()); |
|
189 |
ArrayList comboSource = getHistogramPanel().getComboSource(); |
|
190 |
for (int i = 0; i < comboSource.size(); i++) { |
|
191 |
String name = (String) ((ArrayList) comboSource.get(i)).get(1); |
|
192 |
if (name.compareTo(RasterToolsUtil.getText(this, "datos_visualizados")) == 0) { |
|
193 |
((ArrayList) comboSource.get(i)).remove(0); |
|
194 |
((ArrayList) comboSource.get(i)).add(0, ((FLyrRaster) lyr).getRender().getLastRenderBuffer().getHistogramComputer()); |
|
196 | 195 |
|
197 |
} |
|
198 |
if (name.compareTo(RasterToolsUtil.getText(this, "imagen_completa")) == 0) { |
|
199 |
((ArrayList) comboSource.get(i)).remove(0); |
|
200 |
((ArrayList) comboSource.get(i)).add(0, ((FLyrRaster) lyr).getDataStore().getHistogramComputer()); |
|
201 |
} |
|
202 | 196 |
} |
203 |
showHistogram(); |
|
204 |
} catch (HistogramException e1) { |
|
205 |
e1.printStackTrace(); |
|
206 |
} catch (InterruptedException e1) { |
|
207 |
e1.printStackTrace(); |
|
197 |
if (name.compareTo(RasterToolsUtil.getText(this, "imagen_completa")) == 0) { |
|
198 |
((ArrayList) comboSource.get(i)).remove(0); |
|
199 |
((ArrayList) comboSource.get(i)).add(0, ((FLyrRaster) lyr).getDataStore().getHistogramComputer()); |
|
200 |
} |
|
208 | 201 |
} |
202 |
showHistogram(); |
|
209 | 203 |
return; |
210 | 204 |
} |
211 | 205 |
|
org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/raster/process/ClippingProcess.java | ||
---|---|---|
47 | 47 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
48 | 48 |
import org.gvsig.fmap.dal.coverage.exception.RasterDriverException; |
49 | 49 |
import org.gvsig.fmap.dal.coverage.exception.RmfSerializerException; |
50 |
import org.gvsig.fmap.dal.coverage.process.IncrementableTask; |
|
50 |
import org.gvsig.fmap.dal.coverage.process.BaseIncrementableTask; |
|
51 |
import org.gvsig.fmap.dal.coverage.store.DataServerWriter; |
|
51 | 52 |
import org.gvsig.fmap.dal.coverage.store.RasterDataStore; |
52 | 53 |
import org.gvsig.fmap.dal.coverage.store.RasterQuery; |
53 | 54 |
import org.gvsig.fmap.dal.coverage.store.parameter.NewRasterStoreParameters; |
... | ... | |
90 | 91 |
private AffineTransform affineTransform = null; |
91 | 92 |
private double[] wcValues = null; |
92 | 93 |
private RasterManager rManager = RasterLocator.getManager(); |
93 |
private NewRasterStoreParameters sparams = null;
|
|
94 |
private BaseIncrementableTask processIncrement = null;
|
|
94 | 95 |
|
95 | 96 |
/** |
96 | 97 |
* Variables de la resoluci?n de salida |
... | ... | |
99 | 100 |
private int resolutionHeight = 0; |
100 | 101 |
|
101 | 102 |
private Buffer buffer = null; |
102 |
private IncrementableTask task = null; |
|
103 | 103 |
|
104 | 104 |
/** |
105 | 105 |
* Par?metros obligatorios al proceso: |
... | ... | |
185 | 185 |
/** |
186 | 186 |
* Tarea de recorte |
187 | 187 |
*/ |
188 |
@SuppressWarnings("deprecation") |
|
188 | 189 |
public void process() throws ProcessInterruptedException { |
189 | 190 |
RasterDataStore dstoreCopy = null; |
190 | 191 |
RasterUtils util = RasterLocator.getManager().getRasterUtils(); |
191 |
task = null; |
|
192 | 192 |
|
193 | 193 |
try { |
194 | 194 |
long t2; |
... | ... | |
235 | 235 |
} |
236 | 236 |
|
237 | 237 |
insertLineLog(RasterToolsUtil.getText(this, "interpolando")); |
238 |
|
|
238 |
|
|
239 | 239 |
Buffer bufTmp = buffer; |
240 |
processIncrement = bufTmp.getIncrementableTask(Buffer.INCREMENTABLE_INTERPOLATION); |
|
240 | 241 |
buffer = bufTmp.getAdjustedWindow(resolutionWidth, resolutionHeight, interpolationMethod); |
241 | 242 |
if(bufTmp != buffer) |
242 | 243 |
bufTmp.dispose(); |
243 |
task = buffer.getIncrementableTask(); |
|
244 | 244 |
} else { |
245 | 245 |
try { |
246 | 246 |
if (util.isBufferTooBig(new double[] { 0, 0, resolutionWidth, resolutionHeight }, drawableBands.length)) |
... | ... | |
283 | 283 |
DataServerExplorerParameters eparams = manager.createServerExplorerParameters("FilesystemExplorer"); |
284 | 284 |
|
285 | 285 |
String finalFileName = ""; |
286 |
NewRasterStoreParameters sparams = null; |
|
287 |
processIncrement = RasterLocator.getManager().createDataServerWriter(); |
|
286 | 288 |
if (oneLayerPerBand) { |
287 | 289 |
long[] milis = new long[drawableBands.length]; |
288 | 290 |
String[] fileNames = new String[drawableBands.length]; |
... | ... | |
299 | 301 |
DataServerExplorer serverExplorer = manager.openServerExplorer(eparams.getExplorerName(), eparams); |
300 | 302 |
|
301 | 303 |
sparams = (NewRasterStoreParameters)serverExplorer.getAddParameters(provider); |
304 |
sparams.setDataServer((DataServerWriter)processIncrement); |
|
302 | 305 |
sparams.setDestination(path, file); |
303 | 306 |
sparams.setBuffer(buffer); |
304 | 307 |
sparams.setColorInterpretation(new String[]{ColorInterpretation.GRAY_BAND}); |
... | ... | |
370 | 373 |
} |
371 | 374 |
|
372 | 375 |
sparams = (NewRasterStoreParameters)serverExplorer.getAddParameters(provider); |
376 |
sparams.setDataServer((DataServerWriter)processIncrement); |
|
373 | 377 |
sparams.setDestination(path, file); |
374 | 378 |
sparams.setBuffer(buffer); |
375 | 379 |
if(colorInterp != null) |
... | ... | |
522 | 526 |
* @see org.gvsig.gui.beans.incrementabletask.IIncrementable#getPercent() |
523 | 527 |
*/ |
524 | 528 |
public int getPercent() { |
525 |
if (task != null) { |
|
526 |
if ((task.getPercent() > 0) && (task.getPercent() < 99)) |
|
527 |
return task.getPercent(); |
|
528 |
} |
|
529 |
|
|
530 |
return (sparams != null) ? sparams.getPercent() : 0; |
|
529 |
return (processIncrement != null) ? processIncrement.getPercent() : 0; |
|
531 | 530 |
} |
532 | 531 |
|
533 | 532 |
/* |
... | ... | |
553 | 552 |
colorInterp = null; |
554 | 553 |
affineTransform = null; |
555 | 554 |
wcValues = null; |
556 |
sparams = null; |
|
557 | 555 |
buffer = null; |
558 |
task = null;
|
|
556 |
processIncrement = null;
|
|
559 | 557 |
if(selectedRois != null) { |
560 | 558 |
selectedRois.clear(); |
561 | 559 |
selectedRois = null; |
org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.multifile.io/src/main/java/org/gvsig/raster/tools/multifile/io/MultiFileProvider.java | ||
---|---|---|
39 | 39 |
import org.gvsig.fmap.dal.coverage.exception.BandAccessException; |
40 | 40 |
import org.gvsig.fmap.dal.coverage.exception.FileNotOpenException; |
41 | 41 |
import org.gvsig.fmap.dal.coverage.exception.FileNotSupportedException; |
42 |
import org.gvsig.fmap.dal.coverage.exception.HistogramException; |
|
43 | 42 |
import org.gvsig.fmap.dal.coverage.exception.InvalidSetViewException; |
44 | 43 |
import org.gvsig.fmap.dal.coverage.exception.InvalidSourceException; |
45 | 44 |
import org.gvsig.fmap.dal.coverage.exception.NotSupportedExtensionException; |
... | ... | |
85 | 84 |
* |
86 | 85 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
87 | 86 |
*/ |
87 |
@SuppressWarnings("deprecation") |
|
88 | 88 |
public class MultiFileProvider extends DefaultRasterProvider { |
89 | 89 |
public static String NAME = "Multifile Raster"; |
90 | 90 |
public static String DESCRIPTION = "Multifile Raster Support"; |
... | ... | |
501 | 501 |
* (non-Javadoc) |
502 | 502 |
* @see org.gvsig.fmap.dal.coverage.store.props.Histogramable#getHistogramComputer() |
503 | 503 |
*/ |
504 |
public HistogramComputer getHistogramComputer() throws HistogramException, InterruptedException {
|
|
504 |
public HistogramComputer getHistogramComputer() { |
|
505 | 505 |
if(histogram == null || |
506 | 506 |
(histogram instanceof MultiProviderHistogramComputer && |
507 | 507 |
((MultiProviderHistogramComputer)histogram).getNumberOfProviders() != providerList.size())) { |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.api/src/main/java/org/gvsig/fmap/dal/coverage/store/DataServerWriter.java | ||
---|---|---|
23 | 23 |
|
24 | 24 |
import org.gvsig.fmap.dal.coverage.dataset.Buffer; |
25 | 25 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
26 |
import org.gvsig.fmap.dal.coverage.process.BaseIncrementableTask; |
|
26 | 27 |
import org.gvsig.tools.dispose.Disposable; |
27 | 28 |
|
28 | 29 |
|
... | ... | |
31 | 32 |
* servir datos a los drivers de escritura. |
32 | 33 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
33 | 34 |
*/ |
34 |
public interface DataServerWriter extends Disposable { |
|
35 |
public interface DataServerWriter extends Disposable, BaseIncrementableTask {
|
|
35 | 36 |
/** |
36 | 37 |
* Para el tipo de datos ARGB (32 bits en un solo entero) obtiene un array que representa |
37 | 38 |
* los datos le?dos. Este array se obtendr? de la fuente de datos |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.api/src/main/java/org/gvsig/fmap/dal/coverage/store/parameter/NewRasterStoreParameters.java | ||
---|---|---|
6 | 6 |
import org.gvsig.fmap.dal.NewDataStoreParameters; |
7 | 7 |
import org.gvsig.fmap.dal.coverage.dataset.Buffer; |
8 | 8 |
import org.gvsig.fmap.dal.coverage.datastruct.Params; |
9 |
import org.gvsig.fmap.dal.coverage.store.DataServerWriter; |
|
9 | 10 |
import org.gvsig.fmap.dal.coverage.store.props.ColorInterpretation; |
10 | 11 |
|
11 | 12 |
/** |
... | ... | |
22 | 23 |
public static String FIELD_BAND = "band"; |
23 | 24 |
public static String FIELD_WKT = "wktproj"; |
24 | 25 |
public static String FIELD_AFFINETRANSFORM = "affineTransform"; |
26 |
public static String FIELD_DATA_SERVER = "dataserver"; |
|
25 | 27 |
|
26 | 28 |
/** |
29 |
* Sets the data server |
|
30 |
* @param dataServer |
|
31 |
*/ |
|
32 |
public void setDataServer(DataServerWriter dataServer); |
|
33 |
|
|
34 |
/** |
|
27 | 35 |
* Sets the name of the file to save |
28 | 36 |
* @param fileName |
29 | 37 |
*/ |
... | ... | |
138 | 146 |
*/ |
139 | 147 |
public IProjection getProjection(); |
140 | 148 |
|
141 |
public void setPercent(int n); |
|
142 |
|
|
143 |
public int getPercent(); |
|
149 |
/** |
|
150 |
* Gets the data server |
|
151 |
* @return |
|
152 |
*/ |
|
153 |
public DataServerWriter getDataServer(); |
|
144 | 154 |
} |
145 | 155 |
|
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.api/src/main/java/org/gvsig/fmap/dal/coverage/store/props/HistogramComputer.java | ||
---|---|---|
24 | 24 |
import org.gvsig.fmap.dal.coverage.datastruct.BufferHistogram; |
25 | 25 |
import org.gvsig.fmap.dal.coverage.exception.HistogramException; |
26 | 26 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
27 |
import org.gvsig.fmap.dal.coverage.process.IncrementableTask; |
|
27 | 28 |
|
28 | 29 |
/** |
29 | 30 |
* Interfaz para la gesti?n de histogramas de un raster. Es la encargada del calculo de un histograma |
... | ... | |
34 | 35 |
* |
35 | 36 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
36 | 37 |
*/ |
37 |
public interface HistogramComputer { |
|
38 |
public interface HistogramComputer extends IncrementableTask {
|
|
38 | 39 |
|
39 | 40 |
/** |
40 | 41 |
* Obtiene el minimo valor de las estadisticas de un histograma. |
... | ... | |
59 | 60 |
* Pone a cero el porcentaje de progreso del proceso de calculo de histograma |
60 | 61 |
*/ |
61 | 62 |
public void resetPercent(); |
62 |
|
|
63 |
/** |
|
64 |
* Obtiene el porcentaje de progreso del proceso de calculo de histograma |
|
65 |
* @return porcentaje de progreso |
|
66 |
*/ |
|
67 |
public int getPercent(); |
|
68 | 63 |
|
69 | 64 |
/** |
70 | 65 |
* Force to recalculate the histogram next time that the method getBufferHistogram |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.api/src/main/java/org/gvsig/fmap/dal/coverage/store/props/Histogramable.java | ||
---|---|---|
21 | 21 |
*/ |
22 | 22 |
package org.gvsig.fmap.dal.coverage.store.props; |
23 | 23 |
|
24 |
import org.gvsig.fmap.dal.coverage.exception.HistogramException; |
|
25 | 24 |
|
26 | 25 |
|
27 | 26 |
/** |
... | ... | |
38 | 37 |
* Gets the object which computes the histogram |
39 | 38 |
* @return Histograma |
40 | 39 |
*/ |
41 |
public HistogramComputer getHistogramComputer() throws HistogramException, InterruptedException;
|
|
40 |
public HistogramComputer getHistogramComputer(); |
|
42 | 41 |
|
43 | 42 |
} |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.api/src/main/java/org/gvsig/fmap/dal/coverage/dataset/Buffer.java | ||
---|---|---|
53 | 53 |
public final static int INTERPOLATION_InverseDistance = 3; |
54 | 54 |
public final static int INTERPOLATION_BicubicSpline = 4; |
55 | 55 |
public final static int INTERPOLATION_BSpline = 5; |
56 |
|
|
57 |
public final static int INCREMENTABLE_INTERPOLATION = 0; |
|
58 |
public final static int INCREMENTABLE_HISTOGRAM = 1; |
|
56 | 59 |
|
57 | 60 |
/*public static int TYPE_UNDEFINED = 32; |
58 | 61 |
public static int TYPE_Byte = 0; //Buffer byte (8) |
... | ... | |
486 | 489 |
* this is a BufferInterpolation class. |
487 | 490 |
* @return |
488 | 491 |
*/ |
489 |
public IncrementableTask getIncrementableTask(); |
|
492 |
public IncrementableTask getIncrementableTask(int type);
|
|
490 | 493 |
|
491 | 494 |
public double[][] getAllBandsLimits() throws ProcessInterruptedException; |
492 | 495 |
} |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/store/properties/SimpleProviderHistogramComputer.java | ||
---|---|---|
310 | 310 |
} |
311 | 311 |
return newHistogramComputer; |
312 | 312 |
} |
313 |
|
|
314 |
public String getLog() { |
|
315 |
return null; |
|
316 |
} |
|
317 |
|
|
318 |
public boolean isCancelable() { |
|
319 |
return true; |
|
320 |
} |
|
321 |
|
|
322 |
public boolean isPausable() { |
|
323 |
return false; |
|
324 |
} |
|
325 |
|
|
326 |
public void setPercent(int value) { |
|
327 |
|
|
328 |
} |
|
313 | 329 |
} |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/store/properties/MultiProviderHistogramComputer.java | ||
---|---|---|
71 | 71 |
|
72 | 72 |
for (int i = 0; i < hList.length; i++) { |
73 | 73 |
RasterProvider internalProvider = provider.getInternalProvider(i); |
74 |
try { |
|
75 |
hList[i] = ((Histogramable)internalProvider).getHistogramComputer().getBufferHistogram(); |
|
76 |
} catch (InterruptedException e) { |
|
77 |
throw new ProcessInterruptedException(e); |
|
78 |
} |
|
74 |
hList[i] = ((Histogramable)internalProvider).getHistogramComputer().getBufferHistogram(); |
|
75 |
|
|
79 | 76 |
if (hList[i] == null) |
80 | 77 |
return null; |
81 | 78 |
} |
... | ... | |
118 | 115 |
* Pone a cero el porcentaje de progreso del proceso de calculo de histograma |
119 | 116 |
*/ |
120 | 117 |
public void resetPercent() { |
121 |
for (int i = 0; i < provider.getInternalProviderCount(); i++) |
|
122 |
try { |
|
123 |
((Histogramable)provider.getInternalProvider(i)).getHistogramComputer().resetPercent(); |
|
124 |
} catch (HistogramException e) { |
|
125 |
} catch (InterruptedException e) { |
|
126 |
} |
|
118 |
for (int i = 0; i < provider.getInternalProviderCount(); i++) { |
|
119 |
((Histogramable)provider.getInternalProvider(i)).getHistogramComputer().resetPercent(); |
|
120 |
} |
|
127 | 121 |
} |
128 | 122 |
|
129 | 123 |
/** |
... | ... | |
133 | 127 |
public int getPercent() { |
134 | 128 |
int partial = 0; |
135 | 129 |
for (int i = 0; i < provider.getInternalProviderCount(); i++) |
136 |
try { |
|
137 |
partial += ((Histogramable)provider.getInternalProvider(i)).getHistogramComputer().getPercent(); |
|
138 |
} catch (HistogramException e) { |
|
139 |
e.printStackTrace(); |
|
140 |
} catch (InterruptedException e) { |
|
141 |
e.printStackTrace(); |
|
142 |
} |
|
130 |
partial += ((Histogramable)provider.getInternalProvider(i)).getHistogramComputer().getPercent(); |
|
143 | 131 |
percent += (int)(partial / provider.getInternalProviderCount()); |
144 | 132 |
return percent; |
145 | 133 |
} |
... | ... | |
151 | 139 |
public double getMaximum() { |
152 | 140 |
double max = 0; |
153 | 141 |
for (int i = 0; i < provider.getInternalProviderCount(); i++) { |
154 |
try { |
|
155 |
double m = provider.getInternalProvider(i).getHistogramComputer().getMaximum(); |
|
156 |
if(m > max) |
|
157 |
max = m; |
|
158 |
} catch (HistogramException e) { |
|
159 |
} catch (InterruptedException e) { |
|
160 |
} |
|
142 |
double m = provider.getInternalProvider(i).getHistogramComputer().getMaximum(); |
|
143 |
if(m > max) |
|
144 |
max = m; |
|
161 | 145 |
} |
162 | 146 |
return max; |
163 | 147 |
} |
... | ... | |
169 | 153 |
public double getMinimum() { |
170 | 154 |
double min = Double.POSITIVE_INFINITY; |
171 | 155 |
for (int i = 0; i < provider.getInternalProviderCount(); i++) { |
172 |
try { |
|
173 |
double m = provider.getInternalProvider(i).getHistogramComputer().getMinimum(); |
|
174 |
if(m < min) |
|
175 |
min = m; |
|
176 |
} catch (HistogramException e) { |
|
177 |
} catch (InterruptedException e) { |
|
178 |
} |
|
156 |
double m = provider.getInternalProvider(i).getHistogramComputer().getMinimum(); |
|
157 |
if(m < min) |
|
158 |
min = m; |
|
179 | 159 |
} |
180 | 160 |
return min; |
181 | 161 |
} |
182 |
|
|
162 |
|
|
183 | 163 |
/* |
184 | 164 |
* (non-Javadoc) |
185 | 165 |
* @see org.gvsig.fmap.dal.coverage.store.props.HistogramComputer#refreshHistogram() |
... | ... | |
195 | 175 |
public int getNumberOfProviders() { |
196 | 176 |
return files; |
197 | 177 |
} |
178 |
|
|
179 |
public String getLog() { |
|
180 |
return null; |
|
181 |
} |
|
182 |
|
|
183 |
public boolean isCancelable() { |
|
184 |
return true; |
|
185 |
} |
|
186 |
|
|
187 |
public boolean isPausable() { |
|
188 |
return false; |
|
189 |
} |
|
190 |
|
|
191 |
public void setPercent(int value) { |
|
192 |
|
|
193 |
} |
|
198 | 194 |
} |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/store/properties/RemoteStoreHistogram.java | ||
---|---|---|
85 | 85 |
throw new HistogramException(e.getMessage(), e); |
86 | 86 |
} catch (CloseException e) { |
87 | 87 |
throw new HistogramException(e.getMessage(), e); |
88 |
} catch (InterruptedException e) { |
|
89 |
} |
|
90 |
return null; |
|
88 |
} |
|
91 | 89 |
} |
92 | 90 |
} |
93 | 91 |
|
... | ... | |
143 | 141 |
return 0; |
144 | 142 |
} catch (CloseException e) { |
145 | 143 |
return 0; |
146 |
} catch (HistogramException e) { |
|
147 |
return 0; |
|
148 |
} catch (InterruptedException e) { |
|
149 |
return 0; |
|
150 |
} |
|
144 |
} |
|
151 | 145 |
} |
152 | 146 |
} |
153 | 147 |
|
... | ... | |
177 | 171 |
return 0; |
178 | 172 |
} catch (CloseException e) { |
179 | 173 |
return 0; |
180 |
} catch (HistogramException e) { |
|
181 |
return 0; |
|
182 |
} catch (InterruptedException e) { |
|
183 |
return 0; |
|
184 | 174 |
} |
185 | 175 |
} |
186 | 176 |
} |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/store/DefaultRasterStore.java | ||
---|---|---|
48 | 48 |
import org.gvsig.fmap.dal.coverage.exception.FileNotOpenException; |
49 | 49 |
import org.gvsig.fmap.dal.coverage.exception.FilterManagerException; |
50 | 50 |
import org.gvsig.fmap.dal.coverage.exception.FilterTypeException; |
51 |
import org.gvsig.fmap.dal.coverage.exception.HistogramException; |
|
52 | 51 |
import org.gvsig.fmap.dal.coverage.exception.InvalidSetViewException; |
53 | 52 |
import org.gvsig.fmap.dal.coverage.exception.InvalidSourceException; |
54 | 53 |
import org.gvsig.fmap.dal.coverage.exception.NotSupportedExtensionException; |
... | ... | |
1192 | 1191 |
* (non-Javadoc) |
1193 | 1192 |
* @see org.gvsig.fmap.dal.coverage.store.RasterDataStore#getHistogram() |
1194 | 1193 |
*/ |
1195 |
public HistogramComputer getHistogramComputer() throws HistogramException, InterruptedException {
|
|
1194 |
public HistogramComputer getHistogramComputer() { |
|
1196 | 1195 |
if(provider != null) |
1197 | 1196 |
return provider.getHistogramComputer(); |
1198 | 1197 |
return null; |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/store/DefaultRemoteRasterStore.java | ||
---|---|---|
30 | 30 |
import org.gvsig.fmap.dal.coverage.dataset.Buffer; |
31 | 31 |
import org.gvsig.fmap.dal.coverage.datastruct.Extent; |
32 | 32 |
import org.gvsig.fmap.dal.coverage.exception.CloneException; |
33 |
import org.gvsig.fmap.dal.coverage.exception.HistogramException; |
|
34 | 33 |
import org.gvsig.fmap.dal.coverage.exception.InvalidSetViewException; |
35 | 34 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
36 | 35 |
import org.gvsig.fmap.dal.coverage.exception.RasterDriverException; |
... | ... | |
432 | 431 |
* @see org.gvsig.fmap.dal.coverage.store.RasterDataStore#getHistogram() |
433 | 432 |
*/ |
434 | 433 |
@Override |
435 |
public HistogramComputer getHistogramComputer() throws HistogramException, InterruptedException {
|
|
434 |
public HistogramComputer getHistogramComputer() { |
|
436 | 435 |
if(provider != null) |
437 | 436 |
return provider.getHistogramComputer(); |
438 | 437 |
return null; |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/store/AbstractNewRasterStoreParameters.java | ||
---|---|---|
28 | 28 |
import org.cresques.cts.IProjection; |
29 | 29 |
import org.gvsig.fmap.dal.coverage.dataset.Buffer; |
30 | 30 |
import org.gvsig.fmap.dal.coverage.datastruct.Params; |
31 |
import org.gvsig.fmap.dal.coverage.store.DataServerWriter; |
|
31 | 32 |
import org.gvsig.fmap.dal.coverage.store.parameter.NewRasterStoreParameters; |
32 | 33 |
import org.gvsig.tools.ToolsLocator; |
33 | 34 |
import org.gvsig.tools.dynobject.DelegatedDynObject; |
... | ... | |
47 | 48 |
protected DelegatedDynObject delegatedDynObject = null; |
48 | 49 |
private static DynClass DYNCLASS = null; |
49 | 50 |
private Buffer buffer = null; |
50 |
private int percent = 0; |
|
51 | 51 |
|
52 | 52 |
public AbstractNewRasterStoreParameters() { |
53 | 53 |
super(); |
... | ... | |
61 | 61 |
if (dynClass == null) { |
62 | 62 |
dynClass = dynman.add(DYNCLASS_NAME); |
63 | 63 |
|
64 |
// field = dynClass.addDynField(FIELD_BUFFER);
|
|
65 |
// field.setDescription("Data buffer");
|
|
66 |
// field.setClassOfValue(Object.class);
|
|
67 |
// field.setMandatory(false);
|
|
64 |
field = dynClass.addDynFieldObject(FIELD_DATA_SERVER);
|
|
65 |
field.setDescription("Data server");
|
|
66 |
field.setClassOfValue(Object.class); |
|
67 |
field.setMandatory(false); |
|
68 | 68 |
|
69 | 69 |
field = dynClass.addDynField(FIELD_SRS); |
70 | 70 |
field.setDescription("SRS"); |
... | ... | |
293 | 293 |
|
294 | 294 |
/* |
295 | 295 |
* (non-Javadoc) |
296 |
* @see org.gvsig.fmap.dal.coverage.store.parameter.NewRasterStoreParameters#setPercent(int)
|
|
296 |
* @see org.gvsig.fmap.dal.coverage.store.parameter.NewRasterStoreParameters#getDataServer()
|
|
297 | 297 |
*/ |
298 |
public void setPercent(int n) {
|
|
299 |
this.percent = n;
|
|
298 |
public DataServerWriter getDataServer() {
|
|
299 |
return (DataServerWriter)getDynValue(FIELD_DATA_SERVER);
|
|
300 | 300 |
} |
301 |
|
|
301 |
|
|
302 | 302 |
/* |
303 | 303 |
* (non-Javadoc) |
304 |
* @see org.gvsig.fmap.dal.coverage.store.parameter.NewRasterStoreParameters#getPercent()
|
|
304 |
* @see org.gvsig.fmap.dal.coverage.store.parameter.NewRasterStoreParameters#setDataServer(org.gvsig.fmap.dal.coverage.store.DataServerWriter)
|
|
305 | 305 |
*/ |
306 |
public int getPercent() {
|
|
307 |
return percent;
|
|
306 |
public void setDataServer(DataServerWriter dataServer) {
|
|
307 |
this.setDynValue(FIELD_DATA_SERVER, dataServer);
|
|
308 | 308 |
} |
309 | 309 |
} |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/grid/filter/enhancement/EqualizationFilter.java | ||
---|---|---|
82 | 82 |
exec = false; |
83 | 83 |
} catch (HistogramException e) { |
84 | 84 |
exec = false; |
85 |
} catch (InterruptedException e) { |
|
86 |
exec = false; |
|
87 |
} |
|
85 |
} |
|
88 | 86 |
} |
89 | 87 |
|
90 | 88 |
renderBands = (int[]) params.get("renderBands"); |
... | ... | |
147 | 145 |
} catch (HistogramException e) { |
148 | 146 |
exec = false; |
149 | 147 |
return; |
150 |
} catch (InterruptedException e) { |
|
151 |
exec = false; |
|
152 |
return; |
|
153 |
} |
|
148 |
} |
|
154 | 149 |
double[][] accumNormalize = BufferHistogramImpl.convertTableToNormalizeAccumulate(rgbHistogram.getTable()); |
155 | 150 |
double[][] accumNormalizeNeg = BufferHistogramImpl.convertTableToNormalizeAccumulate(rgbHistogram.getNegativeTable()); |
156 | 151 |
|
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/grid/filter/histogramMatching/HistogramMatchingFilter.java | ||
---|---|---|
132 | 132 |
raster = (RasterBuffer) params.get("raster"); |
133 | 133 |
height = raster.getHeight(); |
134 | 134 |
width = raster.getWidth(); |
135 |
try { |
|
136 | 135 |
|
137 |
histogramSource = raster.getHistogramComputer().getBufferHistogram();
|
|
138 |
histogramSource = BufferHistogramImpl.convertHistogramToRGB(histogramSource);
|
|
136 |
histogramSource = raster.getHistogramComputer().getBufferHistogram(); |
|
137 |
histogramSource = BufferHistogramImpl.convertHistogramToRGB(histogramSource); |
|
139 | 138 |
|
140 |
// COMPROBACION HISTOGRAMA RGB
|
|
141 |
if (!histogramSource.isInRangeRGB())
|
|
142 |
return;
|
|
139 |
// COMPROBACION HISTOGRAMA RGB |
|
140 |
if (!histogramSource.isInRangeRGB()) |
|
141 |
return; |
|
143 | 142 |
|
144 |
// Histograma de referencia
|
|
145 |
histogramReference = (BufferHistogram)params.get("histogramReference");
|
|
146 |
histogramReference = BufferHistogramImpl.convertHistogramToRGB(histogramReference);
|
|
147 |
//numbands = (int)params.get("numbads");
|
|
148 |
numbands = ((Integer)params.get("numbands")).intValue();
|
|
149 |
// Histogramas acumilados y normalizados
|
|
150 |
acumulateS = BufferHistogramImpl.convertTableToNormalizeAccumulate(histogramSource.getTable());
|
|
151 |
acumulateR = BufferHistogramImpl.convertTableToNormalizeAccumulate(histogramReference.getTable());
|
|
143 |
// Histograma de referencia |
|
144 |
histogramReference = (BufferHistogram)params.get("histogramReference"); |
|
145 |
histogramReference = BufferHistogramImpl.convertHistogramToRGB(histogramReference); |
|
146 |
//numbands = (int)params.get("numbads"); |
|
147 |
numbands = ((Integer)params.get("numbands")).intValue(); |
|
148 |
// Histogramas acumilados y normalizados |
|
149 |
acumulateS = BufferHistogramImpl.convertTableToNormalizeAccumulate(histogramSource.getTable()); |
|
150 |
acumulateR = BufferHistogramImpl.convertTableToNormalizeAccumulate(histogramReference.getTable()); |
|
152 | 151 |
|
153 |
} catch (InterruptedException e) { |
|
154 |
throw new ProcessInterruptedException(e); |
|
155 |
} |
|
156 | 152 |
rasterResult = DefaultRasterManager.getInstance().createBuffer(RasterBuffer.TYPE_BYTE,raster.getWidth(),raster.getHeight(),numbands,true); |
157 | 153 |
fileNameOutput = (String)params.get("fileNameOutput"); |
158 | 154 |
} |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/buffer/RasterBuffer.java | ||
---|---|---|
27 | 27 |
import org.gvsig.fmap.dal.coverage.RasterLibrary; |
28 | 28 |
import org.gvsig.fmap.dal.coverage.dataset.Buffer; |
29 | 29 |
import org.gvsig.fmap.dal.coverage.datastruct.NoData; |
30 |
import org.gvsig.fmap.dal.coverage.exception.HistogramException; |
|
31 | 30 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
32 | 31 |
import org.gvsig.fmap.dal.coverage.process.IncrementableTask; |
33 | 32 |
import org.gvsig.fmap.dal.coverage.store.RasterDataStore; |
... | ... | |
87 | 86 |
*/ |
88 | 87 |
protected double notValidValue = 0D; |
89 | 88 |
|
90 |
private BufferInterpolation interp = null; |
|
91 |
|
|
92 | 89 |
/** |
93 | 90 |
* Proceso del cual se devuelve el porcentaje cuando este es solicitado |
94 | 91 |
*/ |
95 | 92 |
private int process = INTERPOLATION_PROCESS; |
96 | 93 |
private HistogramComputer histogramComputer = null; |
94 |
private BufferInterpolation interp = null; |
|
97 | 95 |
|
98 | 96 |
/* |
99 | 97 |
* (non-Javadoc) |
... | ... | |
316 | 314 |
* @see org.gvsig.fmap.driver.Buffer#cloneBuffer() |
317 | 315 |
*/ |
318 | 316 |
public abstract Buffer cloneBuffer(); |
319 |
|
|
317 |
|
|
320 | 318 |
/** |
321 | 319 |
* Ajusta el ?rea del grid a un ancho y un alto dado en pixeles. Este ajuste se har? |
322 | 320 |
* en relaci?n a un m?todo de interpolaci?n definido en el par?metro. |
... | ... | |
325 | 323 |
* @param interpolation M?todo de interpolaci?n que se usar? en el ajuste. |
326 | 324 |
*/ |
327 | 325 |
public Buffer getAdjustedWindow(int w, int h, int interpolationMethod) throws ProcessInterruptedException { |
328 |
if (interp == null) |
|
329 |
interp = new BufferInterpolation(this); |
|
330 |
|
|
326 |
getBufferInterpolation(); |
|
331 | 327 |
if (w == getWidth() && h == getHeight()) |
332 | 328 |
return this; |
333 | 329 |
Buffer rasterBuf = null; |
... | ... | |
358 | 354 |
* (non-Javadoc) |
359 | 355 |
* @see org.gvsig.fmap.dal.coverage.dataset.Buffer#getIncrementableTask() |
360 | 356 |
*/ |
361 |
public IncrementableTask getIncrementableTask() { |
|
362 |
return interp; |
|
357 |
public IncrementableTask getIncrementableTask(int type) { |
|
358 |
switch (type) { |
|
359 |
case INCREMENTABLE_INTERPOLATION: |
|
360 |
return getBufferInterpolation(); |
|
361 |
case INCREMENTABLE_HISTOGRAM: |
|
362 |
return getHistogramComputer(); |
|
363 |
} |
|
364 |
return null; |
|
363 | 365 |
} |
364 | 366 |
|
365 |
public BufferInterpolation getLastInterpolation() { |
|
367 |
/** |
|
368 |
* Gets the buffer interpolation |
|
369 |
* @return |
|
370 |
*/ |
|
371 |
private BufferInterpolation getBufferInterpolation() { |
|
372 |
if(interp == null) |
|
373 |
interp = new BufferInterpolation(this); |
|
366 | 374 |
return interp; |
367 | 375 |
} |
368 | 376 |
|
... | ... | |
370 | 378 |
* (non-Javadoc) |
371 | 379 |
* @see org.gvsig.fmap.dal.coverage.store.props.Histogramable#getHistogramComputer() |
372 | 380 |
*/ |
373 |
public HistogramComputer getHistogramComputer() |
|
374 |
throws HistogramException, InterruptedException { |
|
381 |
public HistogramComputer getHistogramComputer() { |
|
375 | 382 |
if(histogramComputer == null) |
376 | 383 |
histogramComputer = new BufferHistogramComputer(this); |
377 | 384 |
return histogramComputer; |
... | ... | |
726 | 733 |
*/ |
727 | 734 |
protected void finalize() throws Throwable { |
728 | 735 |
histogramComputer = null; |
729 |
interp = null; |
|
730 | 736 |
store = null; |
731 | 737 |
dataExtent = null; |
732 | 738 |
cancel = null; |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/buffer/BufferInterpolation.java | ||
---|---|---|
38 | 38 |
*/ |
39 | 39 |
public class BufferInterpolation implements IncrementableTask { |
40 | 40 |
|
41 |
private RasterBuffer buffer = null;
|
|
41 |
private Buffer buffer = null;
|
|
42 | 42 |
private double percent = 0; |
43 | 43 |
|
44 | 44 |
/** |
45 | 45 |
* Constructor. Asigna un RasterBuffer. |
46 | 46 |
* @param buf |
47 | 47 |
*/ |
48 |
public BufferInterpolation(RasterBuffer buf) {
|
|
48 |
public BufferInterpolation(Buffer buf) { |
|
49 | 49 |
this.buffer = buf; |
50 | 50 |
} |
51 | 51 |
|
... | ... | |
58 | 58 |
public Buffer adjustRasterNearestNeighbourInterpolation(int w, int h) throws ProcessInterruptedException { |
59 | 59 |
RasterTask task = RasterTaskQueue.get(Thread.currentThread().toString()); |
60 | 60 |
|
61 |
double stepX = (double) w / (double) buffer.width;
|
|
62 |
double stepY = (double) h / (double) buffer.height;
|
|
61 |
double stepX = (double) w / (double) buffer.getWidth();
|
|
62 |
double stepY = (double) h / (double) buffer.getHeight();
|
|
63 | 63 |
Buffer rasterBuf = DefaultRasterManager.getInstance().createBuffer(buffer.getDataType(), w, h, buffer.getBandCount(), true); |
64 | 64 |
|
65 | 65 |
|
... | ... | |
68 | 68 |
bands[iBand] = iBand; |
69 | 69 |
|
70 | 70 |
percent = 0; |
71 |
double multip = 100.0D / (buffer.height * bands.length);
|
|
72 |
switch (buffer.dataType) {
|
|
71 |
double multip = 100.0D / (buffer.getHeight() * bands.length);
|
|
72 |
switch (buffer.getDataType()) {
|
|
73 | 73 |
case RasterBuffer.TYPE_BYTE: |
74 | 74 |
for (int iBand = 0; iBand < bands.length; iBand++) { |
75 |
if (w <= buffer.width) { // submuestreo
|
|
76 |
for (int iRow = 0; iRow < buffer.height; iRow++) {
|
|
77 |
for (int iCol = 0; iCol < buffer.width; iCol++)
|
|
75 |
if (w <= buffer.getWidth()) { // submuestreo
|
|
76 |
for (int iRow = 0; iRow < buffer.getHeight(); iRow++) {
|
|
77 |
for (int iCol = 0; iCol < buffer.getWidth(); iCol++)
|
|
78 | 78 |
rasterBuf.setElem((int) (iRow * stepY), (int) (iCol * stepX), bands[iBand], buffer.getElemByte(iRow, iCol, iBand)); |
79 |
percent = (iBand * buffer.height + iRow) * multip;
|
|
79 |
percent = (iBand * buffer.getHeight() + iRow) * multip;
|
|
80 | 80 |
if (task.getEvent() != null) |
81 | 81 |
task.manageEvent(task.getEvent()); |
82 | 82 |
} |
... | ... | |
84 | 84 |
for (int iRow = 0; iRow < h; iRow++) { |
85 | 85 |
for (int iCol = 0; iCol < w; iCol++) |
86 | 86 |
rasterBuf.setElem(iRow, iCol, bands[iBand], buffer.getElemByte((int) (iRow / stepY), (int) (iCol / stepX), iBand)); |
87 |
percent = (iBand * buffer.height + iRow) * multip;
|
|
87 |
percent = (iBand * buffer.getHeight() + iRow) * multip;
|
|
88 | 88 |
if (task.getEvent() != null) |
89 | 89 |
task.manageEvent(task.getEvent()); |
90 | 90 |
} |
... | ... | |
93 | 93 |
break; |
94 | 94 |
case RasterBuffer.TYPE_DOUBLE: |
95 | 95 |
for (int iBand = 0; iBand < bands.length; iBand++) { |
96 |
if (w <= buffer.width) { // submuestreo
|
|
97 |
for (int iRow = 0; iRow < buffer.height; iRow++) {
|
|
98 |
for (int iCol = 0; iCol < buffer.width; iCol++)
|
|
96 |
if (w <= buffer.getWidth()) { // submuestreo
|
|
97 |
for (int iRow = 0; iRow < buffer.getHeight(); iRow++) {
|
|
98 |
for (int iCol = 0; iCol < buffer.getWidth(); iCol++)
|
|
99 | 99 |
rasterBuf.setElem((int) (iRow * stepY), (int) (iCol * stepX), bands[iBand], buffer.getElemDouble(iRow, iCol, iBand)); |
100 |
percent = (iBand * buffer.height + iRow) * multip;
|
|
100 |
percent = (iBand * buffer.getHeight() + iRow) * multip;
|
|
101 | 101 |
if (task.getEvent() != null) |
102 | 102 |
task.manageEvent(task.getEvent()); |
103 | 103 |
} |
... | ... | |
105 | 105 |
for (int iRow = 0; iRow < h; iRow++) { |
106 | 106 |
for (int iCol = 0; iCol < w; iCol++) |
107 | 107 |
rasterBuf.setElem(iRow, iCol, bands[iBand], buffer.getElemDouble((int) (iRow / stepY), (int) (iCol / stepX), iBand)); |
108 |
percent = (iBand * buffer.height + iRow) * multip;
|
|
108 |
percent = (iBand * buffer.getHeight() + iRow) * multip;
|
|
109 | 109 |
if (task.getEvent() != null) |
110 | 110 |
task.manageEvent(task.getEvent()); |
111 | 111 |
} |
... | ... | |
114 | 114 |
break; |
115 | 115 |
case RasterBuffer.TYPE_FLOAT: |
116 | 116 |
for (int iBand = 0; iBand < bands.length; iBand++) { |
117 |
if (w <= buffer.width) { // submuestreo
|
|
118 |
for (int iRow = 0; iRow < buffer.height; iRow++) {
|
|
119 |
for (int iCol = 0; iCol < buffer.width; iCol++)
|
|
117 |
if (w <= buffer.getWidth()) { // submuestreo
|
|
118 |
for (int iRow = 0; iRow < buffer.getHeight(); iRow++) {
|
|
119 |
for (int iCol = 0; iCol < buffer.getWidth(); iCol++)
|
|
120 | 120 |
rasterBuf.setElem((int) (iRow * stepY), (int) (iCol * stepX), bands[iBand], buffer.getElemFloat(iRow, iCol, iBand)); |
121 |
percent = (iBand * buffer.height + iRow) * multip;
|
|
121 |
percent = (iBand * buffer.getHeight() + iRow) * multip;
|
|
122 | 122 |
if (task.getEvent() != null) |
123 | 123 |
task.manageEvent(task.getEvent()); |
124 | 124 |
} |
... | ... | |
126 | 126 |
for (int iRow = 0; iRow < h; iRow++) { |
127 | 127 |
for (int iCol = 0; iCol < w; iCol++) |
128 | 128 |
rasterBuf.setElem(iRow, iCol, bands[iBand], buffer.getElemFloat((int) (iRow / stepY), (int) (iCol / stepX), iBand)); |
129 |
percent = (iBand * buffer.height + iRow) * multip;
|
|
129 |
percent = (iBand * buffer.getHeight() + iRow) * multip;
|
|
130 | 130 |
if (task.getEvent() != null) |
131 | 131 |
task.manageEvent(task.getEvent()); |
132 | 132 |
} |
... | ... | |
135 | 135 |
break; |
136 | 136 |
case RasterBuffer.TYPE_INT: |
137 | 137 |
for (int iBand = 0; iBand < bands.length; iBand++) { |
138 |
if (w <= buffer.width) { // submuestreo
|
|
139 |
for (int iRow = 0; iRow < buffer.height; iRow++) {
|
|
140 |
for (int iCol = 0; iCol < buffer.width; iCol++)
|
|
138 |
if (w <= buffer.getWidth()) { // submuestreo
|
|
139 |
for (int iRow = 0; iRow < buffer.getHeight(); iRow++) {
|
|
140 |
for (int iCol = 0; iCol < buffer.getWidth(); iCol++)
|
|
141 | 141 |
rasterBuf.setElem((int) (iRow * stepY), (int) (iCol * stepX), bands[iBand], buffer.getElemInt(iRow, iCol, iBand)); |
142 |
percent = (iBand * buffer.height + iRow) * multip;
|
|
142 |
percent = (iBand * buffer.getHeight() + iRow) * multip;
|
|
143 | 143 |
if (task.getEvent() != null) |
144 | 144 |
task.manageEvent(task.getEvent()); |
145 | 145 |
} |
... | ... | |
147 | 147 |
for (int iRow = 0; iRow < h; iRow++) { |
148 | 148 |
for (int iCol = 0; iCol < w; iCol++) |
149 | 149 |
rasterBuf.setElem(iRow, iCol, bands[iBand], buffer.getElemInt((int) (iRow / stepY), (int) (iCol / stepX), iBand)); |
150 |
percent = (iBand * buffer.height + iRow) * multip;
|
|
150 |
percent = (iBand * buffer.getHeight() + iRow) * multip;
|
|
151 | 151 |
if (task.getEvent() != null) |
152 | 152 |
task.manageEvent(task.getEvent()); |
153 | 153 |
} |
... | ... | |
157 | 157 |
case RasterBuffer.TYPE_USHORT: |
158 | 158 |
case RasterBuffer.TYPE_SHORT: |
159 | 159 |
for (int iBand = 0; iBand < bands.length; iBand++) { |
160 |
if (w <= buffer.width) { // submuestreo
|
|
161 |
for (int iRow = 0; iRow < buffer.height; iRow++) {
|
|
162 |
for (int iCol = 0; iCol < buffer.width; iCol++)
|
|
160 |
if (w <= buffer.getWidth()) { // submuestreo
|
|
161 |
for (int iRow = 0; iRow < buffer.getHeight(); iRow++) {
|
|
162 |
for (int iCol = 0; iCol < buffer.getWidth(); iCol++)
|
|
163 | 163 |
rasterBuf.setElem((int) (iRow * stepY), (int) (iCol * stepX), bands[iBand], buffer.getElemShort(iRow, iCol, iBand)); |
164 |
percent = (iBand * buffer.height + iRow) * multip;
|
|
164 |
percent = (iBand * buffer.getHeight() + iRow) * multip;
|
|
165 | 165 |
if (task.getEvent() != null) |
166 | 166 |
task.manageEvent(task.getEvent()); |
167 | 167 |
} |
... | ... | |
169 | 169 |
for (int iRow = 0; iRow < h; iRow++) { |
170 | 170 |
for (int iCol = 0; iCol < w; iCol++) |
171 | 171 |
rasterBuf.setElem(iRow, iCol, bands[iBand], buffer.getElemShort((int) (iRow / stepY), (int) (iCol / stepX), iBand)); |
172 |
percent = (iBand * buffer.height + iRow) * multip;
|
|
172 |
percent = (iBand * buffer.getHeight() + iRow) * multip;
|
|
173 | 173 |
if (task.getEvent() != null) |
174 | 174 |
task.manageEvent(task.getEvent()); |
175 | 175 |
} |
... | ... | |
210 | 210 |
public Buffer adjustRasterBilinearInterpolation(int w, int h) throws ProcessInterruptedException { |
211 | 211 |
RasterTask task = RasterTaskQueue.get(Thread.currentThread().toString()); |
212 | 212 |
|
213 |
double pxSize = (double) buffer.width / (double) w;
|
|
213 |
double pxSize = (double) buffer.getWidth() / (double) w;
|
|
214 | 214 |
Buffer rasterBuf = DefaultRasterManager.getInstance().createBuffer(buffer.getDataType(), w, h, buffer.getBandCount(), true); |
215 | 215 |
|
216 | 216 |
double posX = pxSize / 2D; // Empieza en el centro del primer pixel |
... | ... | |
222 | 222 |
|
223 | 223 |
for (int iBand = 0; iBand < buffer.getBandCount(); iBand++) { |
224 | 224 |
posY = pxSize / 2D; |
225 |
switch (buffer.dataType) {
|
|
225 |
switch (buffer.getDataType()) {
|
|
226 | 226 |
case RasterBuffer.TYPE_BYTE: |
227 | 227 |
for (int iRow = 0; iRow < h; iRow++) { |
228 | 228 |
dy = posY - ((int) posY); |
... | ... | |
361 | 361 |
public Buffer adjustRasterInverseDistanceInterpolation(int w, int h) throws ProcessInterruptedException { |
362 | 362 |
RasterTask task = RasterTaskQueue.get(Thread.currentThread().toString()); |
363 | 363 |
|
364 |
double pxSize = (double) buffer.width / (double) w;
|
|
364 |
double pxSize = (double) buffer.getWidth() / (double) w;
|
|
365 | 365 |
Buffer rasterBuf = DefaultRasterManager.getInstance().createBuffer(buffer.getDataType(), w, h, buffer.getBandCount(), true); |
366 | 366 |
|
367 | 367 |
double posX = pxSize / 2D; |
... | ... | |
373 | 373 |
|
374 | 374 |
for (int iBand = 0; iBand < buffer.getBandCount(); iBand++) { |
375 | 375 |
posY = pxSize / 2D; |
376 |
switch (buffer.dataType) {
|
|
376 |
switch (buffer.getDataType()) {
|
|
377 | 377 |
case RasterBuffer.TYPE_BYTE: |
378 | 378 |
for (int iRow = 0; iRow < h; iRow++) { |
379 | 379 |
dy = posY - ((int) posY); |
... | ... | |
488 | 488 |
public Buffer adjustRasterBSplineInterpolation(int w, int h) throws ProcessInterruptedException { |
489 | 489 |
RasterTask task = RasterTaskQueue.get(Thread.currentThread().toString()); |
490 | 490 |
|
491 |
double pxSize = (double) buffer.width / (double) w;
|
|
491 |
double pxSize = (double) buffer.getWidth() / (double) w;
|
|
492 | 492 |
Buffer rasterBuf = DefaultRasterManager.getInstance().createBuffer(buffer.getDataType(), w, h, buffer.getBandCount(), true); |
493 | 493 |
|
494 | 494 |
double posX = pxSize / 2D; |
... | ... | |
500 | 500 |
|
501 | 501 |
for (int iBand = 0; iBand < buffer.getBandCount(); iBand++) { |
502 | 502 |
posY = pxSize / 2D; |
503 |
switch (buffer.dataType) {
|
|
503 |
switch (buffer.getDataType()) {
|
|
504 | 504 |
case RasterBuffer.TYPE_BYTE: |
505 | 505 |
for (int iRow = 0; iRow < h; iRow++) { |
506 | 506 |
dy = posY - ((int) posY); |
... | ... | |
634 | 634 |
public Buffer adjustRasterBicubicSplineInterpolation(int w, int h) throws ProcessInterruptedException { |
635 | 635 |
RasterTask task = RasterTaskQueue.get(Thread.currentThread().toString()); |
636 | 636 |
|
637 |
double pxSize = (double) buffer.width / (double) w;
|
|
637 |
double pxSize = (double) buffer.getWidth() / (double) w;
|
|
638 | 638 |
Buffer rasterBuf = DefaultRasterManager.getInstance().createBuffer(buffer.getDataType(), w, h, buffer.getBandCount(), true); |
639 | 639 |
|
640 | 640 |
double posX = pxSize / 2D; |
... | ... | |
646 | 646 |
|
647 | 647 |
for (int iBand = 0; iBand < buffer.getBandCount(); iBand++) { |
648 | 648 |
posY = pxSize / 2D; |
649 |
switch (buffer.dataType) {
|
|
649 |
switch (buffer.getDataType()) {
|
|
650 | 650 |
case RasterBuffer.TYPE_BYTE: |
651 | 651 |
for (int iRow = 0; iRow < h; iRow++) { |
652 | 652 |
dy = posY - ((int) posY); |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/buffer/DefaultDataServerWriter.java | ||
---|---|---|
282 | 282 |
if(alphaBuffer != null) |
283 | 283 |
alphaBuffer.dispose(); |
284 | 284 |
} |
285 |
|
|
286 |
public void setPercent(int value) { |
|
287 |
// TODO Auto-generated method stub |
|
288 |
|
|
289 |
} |
|
285 | 290 |
} |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/buffer/cache/PageBuffer.java | ||
---|---|---|
28 | 28 |
import org.gvsig.fmap.dal.coverage.dataset.Buffer; |
29 | 29 |
import org.gvsig.fmap.dal.coverage.datastruct.Band; |
30 | 30 |
import org.gvsig.fmap.dal.coverage.datastruct.NoData; |
31 |
import org.gvsig.fmap.dal.coverage.exception.HistogramException; |
|
32 | 31 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
33 | 32 |
import org.gvsig.fmap.dal.coverage.process.IncrementableTask; |
34 | 33 |
import org.gvsig.fmap.dal.coverage.store.RasterDataStore; |
35 | 34 |
import org.gvsig.fmap.dal.coverage.store.props.HistogramComputer; |
36 | 35 |
import org.gvsig.raster.impl.buffer.BufferHistogramComputer; |
36 |
import org.gvsig.raster.impl.buffer.BufferInterpolation; |
|
37 | 37 |
import org.gvsig.raster.impl.process.RasterTask; |
38 | 38 |
import org.gvsig.raster.impl.process.RasterTaskQueue; |
39 | 39 |
import org.gvsig.tools.exception.BaseException; |
... | ... | |
51 | 51 |
private PageBandBuffer[] pageBandBuffer = null; |
52 | 52 |
private double[] limits = null; |
53 | 53 |
private HistogramComputer histogramComputer = null; |
54 |
private BufferInterpolation interp = null; |
|
54 | 55 |
|
55 | 56 |
/** |
56 | 57 |
* Constructor |
... | ... | |
713 | 714 |
* (non-Javadoc) |
714 | 715 |
* @see org.gvsig.fmap.dal.coverage.store.props.Histogramable#getHistogramComputer() |
715 | 716 |
*/ |
716 |
public HistogramComputer getHistogramComputer() |
|
717 |
throws HistogramException, InterruptedException { |
|
717 |
public HistogramComputer getHistogramComputer() { |
|
718 | 718 |
if(histogramComputer == null) |
719 | 719 |
histogramComputer = new BufferHistogramComputer(this); |
720 | 720 |
return histogramComputer; |
... | ... | |
750 | 750 |
* (non-Javadoc) |
751 | 751 |
* @see org.gvsig.fmap.dal.coverage.dataset.Buffer#getIncrementableTask() |
752 | 752 |
*/ |
753 |
public IncrementableTask getIncrementableTask() { |
|
753 |
public IncrementableTask getIncrementableTask(int type) { |
|
754 |
switch (type) { |
|
755 |
case INCREMENTABLE_INTERPOLATION: |
|
756 |
return getBufferInterpolation(); |
|
757 |
case INCREMENTABLE_HISTOGRAM: |
|
758 |
return getHistogramComputer(); |
|
759 |
} |
|
754 | 760 |
return null; |
755 | 761 |
} |
756 | 762 |
|
763 |
/** |
|
764 |
* Gets the buffer interpolation |
|
765 |
* @return |
|
766 |
*/ |
|
767 |
private BufferInterpolation getBufferInterpolation() { |
|
768 |
if(interp == null) |
|
769 |
interp = new BufferInterpolation(this); |
|
770 |
return interp; |
|
771 |
} |
|
772 |
|
|
757 | 773 |
/* |
758 | 774 |
* (non-Javadoc) |
759 | 775 |
* @see org.gvsig.fmap.dal.coverage.buffer.Buffer#getAdjustedWindow(int, int, int) |
760 | 776 |
*/ |
761 | 777 |
public Buffer getAdjustedWindow(int w, int h, int interpolationMethod) throws ProcessInterruptedException { |
762 |
return null; |
|
778 |
getBufferInterpolation(); |
|
779 |
if (w == getWidth() && h == getHeight()) |
|
780 |
return this; |
|
781 |
Buffer rasterBuf = null; |
|
782 |
switch (interpolationMethod) { |
|
783 |
case Buffer.INTERPOLATION_NearestNeighbour: |
|
784 |
rasterBuf = interp.adjustRasterNearestNeighbourInterpolation(w, h); |
|
785 |
break; |
|
786 |
case Buffer.INTERPOLATION_Bilinear: |
|
787 |
rasterBuf = interp.adjustRasterBilinearInterpolation(w, h); |
|
788 |
break; |
|
789 |
case Buffer.INTERPOLATION_InverseDistance: |
|
790 |
rasterBuf = interp.adjustRasterInverseDistanceInterpolation(w, h); |
|
791 |
break; |
|
792 |
case Buffer.INTERPOLATION_BicubicSpline: |
|
793 |
rasterBuf = interp.adjustRasterBicubicSplineInterpolation(w, h); |
|
794 |
break; |
|
795 |
case Buffer.INTERPOLATION_BSpline: |
|
796 |
rasterBuf = interp.adjustRasterBSplineInterpolation(w, h); |
|
797 |
break; |
|
798 |
} |
|
799 |
if (rasterBuf != null) |
|
800 |
return rasterBuf; |
|
801 |
else |
|
802 |
return this; |
|
763 | 803 |
} |
764 | 804 |
|
765 | 805 |
public Rectangle2D getDataExtent() { |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/buffer/cache/WriterBufferCompleteServer.java | ||
---|---|---|
186 | 186 |
public Buffer getSource() { |
187 | 187 |
return buffer; |
188 | 188 |
} |
189 |
|
|
190 |
public void setPercent(int value) { |
|
191 |
// TODO Auto-generated method stub |
|
192 |
|
|
193 |
} |
|
189 | 194 |
} |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/buffer/BufferHistogramComputer.java | ||
---|---|---|
152 | 152 |
public void refreshHistogram() { |
153 | 153 |
refresh = true; |
154 | 154 |
} |
155 |
|
|
156 |
public String getLog() { |
|
157 |
return null; |
|
158 |
} |
|
159 |
|
|
160 |
public boolean isCancelable() { |
|
161 |
return true; |
|
162 |
} |
|
163 |
|
|
164 |
public boolean isPausable() { |
|
165 |
return false; |
|
166 |
} |
|
167 |
|
|
168 |
public void setPercent(int value) { |
|
169 |
progressHistogram = value; |
|
170 |
} |
|
155 | 171 |
} |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/provider/DefaultRasterProvider.java | ||
---|---|---|
43 | 43 |
import org.gvsig.fmap.dal.coverage.exception.BandAccessException; |
44 | 44 |
import org.gvsig.fmap.dal.coverage.exception.CloneException; |
45 | 45 |
import org.gvsig.fmap.dal.coverage.exception.FileNotOpenException; |
46 |
import org.gvsig.fmap.dal.coverage.exception.HistogramException; |
|
47 | 46 |
import org.gvsig.fmap.dal.coverage.exception.InvalidSetViewException; |
48 | 47 |
import org.gvsig.fmap.dal.coverage.exception.InvalidSourceException; |
49 | 48 |
import org.gvsig.fmap.dal.coverage.exception.ParsingException; |
... | ... | |
993 | 992 |
* (non-Javadoc) |
994 | 993 |
* @see org.gvsig.fmap.dal.coverage.store.props.Histogramable#getHistogramComputer() |
995 | 994 |
*/ |
996 |
public HistogramComputer getHistogramComputer() throws HistogramException, InterruptedException {
|
|
995 |
public HistogramComputer getHistogramComputer() { |
|
997 | 996 |
if (histogram == null) |
998 | 997 |
histogram = new SimpleProviderHistogramComputer(this); |
999 | 998 |
return histogram; |
org.gvsig.raster.wms/trunk/org.gvsig.raster.wms/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSProvider.java | ||
---|---|---|
42 | 42 |
import org.gvsig.fmap.dal.coverage.exception.BandAccessException; |
43 | 43 |
import org.gvsig.fmap.dal.coverage.exception.BandNotFoundInListException; |
44 | 44 |
import org.gvsig.fmap.dal.coverage.exception.FileNotOpenException; |
45 |
import org.gvsig.fmap.dal.coverage.exception.HistogramException; |
|
46 | 45 |
import org.gvsig.fmap.dal.coverage.exception.InvalidSetViewException; |
47 | 46 |
import org.gvsig.fmap.dal.coverage.exception.NotSupportedExtensionException; |
48 | 47 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
... | ... | |
1148 | 1147 |
* (non-Javadoc) |
1149 | 1148 |
* @see org.gvsig.fmap.dal.coverage.store.props.Histogramable#getHistogramComputer() |
1150 | 1149 |
*/ |
1151 |
public HistogramComputer getHistogramComputer() throws HistogramException, InterruptedException {
|
|
1150 |
public HistogramComputer getHistogramComputer() { |
|
1152 | 1151 |
if (histogram == null) |
1153 | 1152 |
histogram = new RemoteStoreHistogram(this); |
1154 | 1153 |
return histogram; |
org.gvsig.raster.gdal/trunk/org.gvsig.raster.gdal/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/io/GdalFilesystemServerExplorer.java | ||
---|---|---|
81 | 81 |
if(parameters instanceof NewRasterStoreParameters) |
82 | 82 |
p = (NewRasterStoreParameters)parameters; |
83 | 83 |
|
84 |
DataServerWriter dataWriter = RasterLocator.getManager().createDataServerWriter(); |
|
84 |
DataServerWriter dataWriter = p.getDataServer(); |
|
85 |
if(dataWriter == null) |
|
86 |
dataWriter = RasterLocator.getManager().createDataServerWriter(); |
|
87 |
|
|
85 | 88 |
dataWriter.setBuffer(p.getBuffer(), p.getBand()); |
86 | 89 |
Params params; |
87 | 90 |
try { |
org.gvsig.raster.ermapper/trunk/org.gvsig.raster.ermapper/org.gvsig.raster.ermapper.io/src/main/java/org/gvsig/raster/ermapper/io/ErmapperFilesystemServerExplorer.java | ||
---|---|---|
80 | 80 |
if(parameters instanceof NewRasterStoreParameters) |
81 | 81 |
p = (NewRasterStoreParameters)parameters; |
82 | 82 |
|
83 |
DataServerWriter dataWriter = RasterLocator.getManager().createDataServerWriter(); |
|
83 |
DataServerWriter dataWriter = p.getDataServer(); |
|
84 |
if(dataWriter == null) |
|
85 |
dataWriter = RasterLocator.getManager().createDataServerWriter(); |
|
84 | 86 |
dataWriter.setBuffer(p.getBuffer(), p.getBand()); |
85 | 87 |
Params params; |
86 | 88 |
try { |
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.io/src/main/java/org/gvsig/raster/wmts/io/WMTSProvider.java | ||
---|---|---|
44 | 44 |
import org.gvsig.fmap.dal.coverage.exception.BandAccessException; |
45 | 45 |
import org.gvsig.fmap.dal.coverage.exception.BandNotFoundInListException; |
46 | 46 |
import org.gvsig.fmap.dal.coverage.exception.FileNotOpenException; |
47 |
import org.gvsig.fmap.dal.coverage.exception.HistogramException; |
|
48 | 47 |
import org.gvsig.fmap.dal.coverage.exception.InvalidSetViewException; |
49 | 48 |
import org.gvsig.fmap.dal.coverage.exception.NotSupportedExtensionException; |
50 | 49 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
... | ... | |
102 | 101 |
* |
103 | 102 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
104 | 103 |
*/ |
104 |
@SuppressWarnings("deprecation") |
|
105 | 105 |
public class WMTSProvider extends DefaultRasterProvider implements RemoteRasterProvider, TiledRasterProvider { |
106 | 106 |
public static String NAME = "Wmts Store"; |
107 | 107 |
public static String DESCRIPTION = "Wmts Raster file"; |
... | ... | |
1486 | 1486 |
* (non-Javadoc) |
1487 | 1487 |
* @see org.gvsig.fmap.dal.coverage.store.props.Histogramable#getHistogramComputer() |
1488 | 1488 |
*/ |
1489 |
public HistogramComputer getHistogramComputer() throws HistogramException, InterruptedException {
|
|
1489 |
public HistogramComputer getHistogramComputer() { |
|
1490 | 1490 |
if (histogram == null) |
1491 | 1491 |
histogram = new RemoteStoreHistogram(this); |
1492 | 1492 |
return histogram; |
org.gvsig.raster.wcs/trunk/org.gvsig.raster.wcs/org.gvsig.raster.wcs.io/src/main/java/org/gvsig/raster/wcs/io/WCSProvider.java | ||
---|---|---|
41 | 41 |
import org.gvsig.fmap.dal.coverage.exception.BandAccessException; |
42 | 42 |
import org.gvsig.fmap.dal.coverage.exception.BandNotFoundInListException; |
43 | 43 |
import org.gvsig.fmap.dal.coverage.exception.FileNotOpenException; |
44 |
import org.gvsig.fmap.dal.coverage.exception.HistogramException; |
|
45 | 44 |
import org.gvsig.fmap.dal.coverage.exception.InvalidSetViewException; |
46 | 45 |
import org.gvsig.fmap.dal.coverage.exception.NotSupportedExtensionException; |
47 | 46 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
... | ... | |
84 | 83 |
* |
85 | 84 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
86 | 85 |
*/ |
86 |
@SuppressWarnings("deprecation") |
|
87 | 87 |
public class WCSProvider extends DefaultRasterProvider implements RemoteRasterProvider { |
88 | 88 |
public static String NAME = "Wcs Store"; |
89 | 89 |
public static String DESCRIPTION = "Wcs Raster file"; |
... | ... | |
1182 | 1182 |
* (non-Javadoc) |
1183 | 1183 |
* @see org.gvsig.fmap.dal.coverage.store.props.Histogramable#getHistogramComputer() |
1184 | 1184 |
*/ |
1185 |
public HistogramComputer getHistogramComputer() throws HistogramException, InterruptedException {
|
|
1185 |
public HistogramComputer getHistogramComputer() { |
|
1186 | 1186 |
if (histogram == null) |
1187 | 1187 |
histogram = new RemoteStoreHistogram(this); |
1188 | 1188 |
return histogram; |
Also available in: Unified diff