Revision 2354 org.gvsig.raster.tools/trunk/templates/rasterTaskProjectTemplate/alg_with_preview_template/sources/algorithm/ProjectTemplateProcess.java
ProjectTemplateProcess.java | ||
---|---|---|
4 | 4 |
import java.util.List; |
5 | 5 |
|
6 | 6 |
import javax.swing.SwingUtilities; |
7 |
|
|
7 | 8 |
import java.awt.geom.Rectangle2D; |
8 | 9 |
|
9 | 10 |
import org.gvsig.fmap.dal.coverage.RasterLocator; |
... | ... | |
31 | 32 |
public static String FILENAME = "FileName"; |
32 | 33 |
public static String EXPORT = "Export"; |
33 | 34 |
|
35 |
public static String TEST = "Test"; |
|
34 | 36 |
public static String TEST_EXTENT = "TestExtent"; |
35 | 37 |
public static String TEST_WIDTH = "TestWidth"; |
36 | 38 |
public static String TEST_HEIGHT = "TestHeight"; |
37 | 39 |
|
40 |
private boolean test = false; |
|
38 | 41 |
private RasterDataStore store = null; |
39 | 42 |
private String filename = null; |
40 | 43 |
private boolean export = true; |
... | ... | |
54 | 57 |
registerInputParameter(RASTER_STORE, RasterDataStore.class, ProjectTemplateAlgorithmLibrary.PROCESS_LABEL); |
55 | 58 |
registerInputParameter(PATH, String.class, ProjectTemplateAlgorithmLibrary.PROCESS_LABEL); |
56 | 59 |
registerInputParameter(EXPORT, Boolean.class, ProjectTemplateAlgorithmLibrary.PROCESS_LABEL); |
60 |
registerInputParameter(TEST, Boolean.class, ProjectTemplateAlgorithmLibrary.PROCESS_LABEL); |
|
57 | 61 |
registerInputParameter(TEST_EXTENT, Extent.class, ProjectTemplateAlgorithmLibrary.PROCESS_LABEL); |
58 | 62 |
registerInputParameter(TEST_WIDTH, Integer.class, ProjectTemplateAlgorithmLibrary.PROCESS_LABEL); |
59 | 63 |
registerInputParameter(TEST_HEIGHT, Integer.class, ProjectTemplateAlgorithmLibrary.PROCESS_LABEL); |
... | ... | |
66 | 70 |
filename = getStringParam(PATH); |
67 | 71 |
export = getBooleanParam(EXPORT); |
68 | 72 |
|
73 |
test = getBooleanParam(TEST); |
|
69 | 74 |
testExtent = getParam(TEST_EXTENT) != null ? (Extent)getParam(TEST_EXTENT) : null; |
70 | 75 |
testWidth = getIntParam(TEST_WIDTH); |
71 | 76 |
testHeight = getIntParam(TEST_HEIGHT); |
... | ... | |
102 | 107 |
try { |
103 | 108 |
sourceBuffer = store.query(query); |
104 | 109 |
sourceBuffer.setDataExtent(testExtent.toRectangle2D()); |
105 |
} catch (RasterDriverException e) {
|
|
110 |
} catch (org.gvsig.fmap.dal.coverage.exception.QueryException e) {
|
|
106 | 111 |
throw new ProjectTemplateException(""); |
107 |
} catch (InvalidSetViewException e) { |
|
108 |
throw new ProjectTemplateException(""); |
|
109 |
} |
|
112 |
} |
|
110 | 113 |
bufferForTest = sourceBuffer; |
111 | 114 |
|
112 | 115 |
////////////////////////// |
Also available in: Unified diff