Revision 5414
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/.project | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<projectDescription> |
|
3 |
<name>org.gvsig.raster.tasseledcap</name> |
|
4 |
<comment></comment> |
|
5 |
<projects> |
|
6 |
</projects> |
|
7 |
<buildSpec> |
|
8 |
<buildCommand> |
|
9 |
<name>org.eclipse.m2e.core.maven2Builder</name> |
|
10 |
<arguments> |
|
11 |
</arguments> |
|
12 |
</buildCommand> |
|
13 |
</buildSpec> |
|
14 |
<natures> |
|
15 |
<nature>org.eclipse.m2e.core.maven2Nature</nature> |
|
16 |
</natures> |
|
17 |
</projectDescription> |
|
0 | 18 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.toolbox.algorithm/src/main/java/org/gvsig/raster/tasseledcap/TasseledCapSextanteLibrary.java | ||
---|---|---|
1 |
package org.gvsig.raster.tasseledcap; |
|
2 |
|
|
3 |
import org.gvsig.geoprocess.algorithm.base.core.AlgorithmAbstractLibrary; |
|
4 |
import org.gvsig.i18n.Messages; |
|
5 |
import org.gvsig.tools.library.LibraryException; |
|
6 |
|
|
7 |
/** |
|
8 |
* Initialization of <code>PrincipalComponentsSextanteLibrary</code> library. |
|
9 |
*/ |
|
10 |
public class TasseledCapSextanteLibrary extends AlgorithmAbstractLibrary { |
|
11 |
|
|
12 |
@Override |
|
13 |
protected void doInitialize() throws LibraryException { |
|
14 |
// Nothing to do |
|
15 |
} |
|
16 |
|
|
17 |
@Override |
|
18 |
protected void doPostInitialize() throws LibraryException { |
|
19 |
Messages.addResourceFamily( |
|
20 |
"org.gvsig.raster.tasseledcap.sextante.i18n.text", TasseledCapSextanteLibrary.class |
|
21 |
.getClassLoader(), TasseledCapSextanteLibrary.class.getClass().getName()); |
|
22 |
registerGeoProcess(new TasseledCapSextanteAlgorithm()); |
|
23 |
} |
|
24 |
|
|
25 |
} |
|
0 | 26 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.toolbox.algorithm/src/main/java/org/gvsig/raster/tasseledcap/TasseledCapSextanteAlgorithm.java | ||
---|---|---|
1 |
package org.gvsig.raster.tasseledcap; |
|
2 |
|
|
3 |
import java.util.List; |
|
4 |
|
|
5 |
import org.gvsig.fmap.dal.coverage.RasterLocator; |
|
6 |
import org.gvsig.fmap.dal.coverage.datastruct.Extent; |
|
7 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
|
8 |
import org.gvsig.fmap.dal.coverage.store.RasterDataStore; |
|
9 |
import org.gvsig.geoprocess.lib.sextante.AbstractSextanteGeoProcess; |
|
10 |
import org.gvsig.geoprocess.lib.sextante.dataObjects.FLyrRasterIRasterLayer; |
|
11 |
import org.gvsig.raster.algorithm.RasterBaseAlgorithmLibrary; |
|
12 |
import org.gvsig.raster.algorithm.process.DataProcess; |
|
13 |
import org.gvsig.raster.algorithm.process.IProcessActions; |
|
14 |
import org.gvsig.raster.algorithm.process.ProcessException; |
|
15 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
|
16 |
import org.gvsig.raster.tasseledcap.algorithm.TasseledCapAlgorithmLibrary; |
|
17 |
import org.gvsig.raster.tasseledcap.algorithm.TasseledCapProcess; |
|
18 |
|
|
19 |
import es.unex.sextante.core.AnalysisExtent; |
|
20 |
import es.unex.sextante.core.Sextante; |
|
21 |
import es.unex.sextante.dataObjects.IRasterLayer; |
|
22 |
import es.unex.sextante.exceptions.GeoAlgorithmExecutionException; |
|
23 |
import es.unex.sextante.exceptions.RepeatedParameterNameException; |
|
24 |
|
|
25 |
/** |
|
26 |
* ... |
|
27 |
*/ |
|
28 |
public class TasseledCapSextanteAlgorithm extends AbstractSextanteGeoProcess implements IProcessActions { |
|
29 |
public static final String RESULT = "RESULT"; |
|
30 |
public static final String LAYER = TasseledCapProcess.RASTER_STORE; |
|
31 |
public static final String USE_ROI = "USE_ROI"; |
|
32 |
public static final String TYPE = "TYPE"; |
|
33 |
|
|
34 |
public static String[] LANDSAT_TYPES = new String[]{"Landsat MS" , "Landsat TM", "Landsat ETM"}; |
|
35 |
|
|
36 |
|
|
37 |
private boolean useROI = false; |
|
38 |
private DataProcess taskStats = null; |
|
39 |
private DataProcess taskPC = null; |
|
40 |
private int type = 0; |
|
41 |
|
|
42 |
|
|
43 |
public void defineCharacteristics() { |
|
44 |
setName(getTranslation("tasseled_cap")); |
|
45 |
setGroup(getTranslation("multispectral")); |
|
46 |
|
|
47 |
try { |
|
48 |
m_Parameters.addInputRasterLayer(LAYER, getTranslation("Input_layer"), true); |
|
49 |
m_Parameters.addBoolean(USE_ROI, getTranslation("use_roi"), false); |
|
50 |
m_Parameters.addSelection(TYPE, getTranslation("type"), LANDSAT_TYPES); |
|
51 |
} catch (RepeatedParameterNameException e) { |
|
52 |
Sextante.addErrorToLog(e); |
|
53 |
} |
|
54 |
addOutputRasterLayer(RESULT, getTranslation("tasseled_cap")); |
|
55 |
} |
|
56 |
|
|
57 |
public boolean processAlgorithm() throws GeoAlgorithmExecutionException { |
|
58 |
|
|
59 |
if(existsOutPutFile(TasseledCapSextanteAlgorithm.RESULT, 0)) { |
|
60 |
throw new GeoAlgorithmExecutionException(getTranslation("file_exists")); |
|
61 |
} |
|
62 |
|
|
63 |
IRasterLayer input = m_Parameters.getParameterValueAsRasterLayer(LAYER); |
|
64 |
useROI = m_Parameters.getParameterValueAsBoolean(USE_ROI); |
|
65 |
String value = m_Parameters.getParameterValueAsString(TYPE); |
|
66 |
type = 0; |
|
67 |
for (int j = 0; j < LANDSAT_TYPES.length; j++) { |
|
68 |
if(LANDSAT_TYPES[j].equals(value)) |
|
69 |
type = j; |
|
70 |
} |
|
71 |
|
|
72 |
FLyrRaster lyrRaster = ((FLyrRaster)input.getBaseDataObject()); |
|
73 |
IRasterLayer output = null; |
|
74 |
|
|
75 |
output = getNewRORasterLayer( |
|
76 |
RESULT, |
|
77 |
Sextante.getText("tasseledcap_description"), |
|
78 |
input.getDataType(), |
|
79 |
input.getBandsCount()); |
|
80 |
|
|
81 |
String fileName = ((FLyrRasterIRasterLayer)output).getName(); |
|
82 |
|
|
83 |
try { |
|
84 |
setProgressText(getTranslation("calculating")); |
|
85 |
taskPC = createTasseledCapProcess(lyrRaster.getDataStore(), fileName, type); |
|
86 |
taskPC.execute(); |
|
87 |
((FLyrRasterIRasterLayer)output).setBaseDataObject(fileName); |
|
88 |
} catch (ProcessInterruptedException e) { |
|
89 |
Sextante.addErrorToLog(e); |
|
90 |
} catch (ProcessException e) { |
|
91 |
Sextante.addErrorToLog(e); |
|
92 |
} |
|
93 |
|
|
94 |
if(getTaskMonitor().isCanceled()) |
|
95 |
return false; |
|
96 |
|
|
97 |
return true; |
|
98 |
} |
|
99 |
|
|
100 |
private DataProcess createTasseledCapProcess(RasterDataStore inputStore, String fileName, int type) throws ProcessException { |
|
101 |
DataProcess taskPC = RasterBaseAlgorithmLibrary.getManager().createRasterTask(TasseledCapAlgorithmLibrary.TASSELEDCAP_PROCESS_LABEL); |
|
102 |
taskPC.setActions(this); |
|
103 |
List<String> params = taskPC.getRasterTaskInputParameters(TasseledCapAlgorithmLibrary.TASSELEDCAP_PROCESS_LABEL); |
|
104 |
for (int i = 0; i < params.size(); i++) { |
|
105 |
String paramName = params.get(i); |
|
106 |
Class<?> paramType = taskPC.getParameterTypeByProcess(TasseledCapAlgorithmLibrary.TASSELEDCAP_PROCESS_LABEL, paramName); |
|
107 |
if(paramType == RasterDataStore.class) { |
|
108 |
taskPC.addParam(paramName, (RasterDataStore)inputStore); |
|
109 |
} |
|
110 |
|
|
111 |
if(paramType == Boolean[].class) { |
|
112 |
boolean[] bands = new boolean[type == 0 ? 4 : 6]; |
|
113 |
for (int j = 0; j < bands.length; j++) { |
|
114 |
bands[j] = true; |
|
115 |
} |
|
116 |
taskPC.addParam(paramName, bands); |
|
117 |
} |
|
118 |
|
|
119 |
if(paramType == Integer.class) { |
|
120 |
taskPC.addParam(paramName, type); |
|
121 |
} |
|
122 |
|
|
123 |
if(paramName.equals("PATH")) { |
|
124 |
taskPC.addParam(paramName, fileName); |
|
125 |
} |
|
126 |
|
|
127 |
if(paramName.equals("ROI_EPSG") && useROI) { |
|
128 |
taskPC.addParam(paramName, "EPSG:4326"); |
|
129 |
} |
|
130 |
|
|
131 |
if(paramName.equals("WINDOW")) { |
|
132 |
AnalysisExtent ext = getAnalysisExtent(); |
|
133 |
Extent bbox = RasterLocator.getManager().getDataStructFactory().createExtent( |
|
134 |
ext.getXMin(), ext.getYMax(), ext.getXMax(), ext.getYMin()); |
|
135 |
Extent inputBbox = inputStore.getExtent(); |
|
136 |
if(bbox.getULX() != inputBbox.getULX() || |
|
137 |
bbox.getULY() != inputBbox.getULY() || |
|
138 |
bbox.getLRX() != inputBbox.getLRX() || |
|
139 |
bbox.getLRY() != inputBbox.getLRY()) { |
|
140 |
taskPC.addParam(paramName, bbox); |
|
141 |
} |
|
142 |
} |
|
143 |
} |
|
144 |
return taskPC; |
|
145 |
} |
|
146 |
|
|
147 |
public void interrupted() { |
|
148 |
|
|
149 |
} |
|
150 |
|
|
151 |
public void end(Object param) { |
|
152 |
|
|
153 |
} |
|
154 |
|
|
155 |
public void updateProgress(int current, int total) { |
|
156 |
boolean cancelled = setProgress(current, total); |
|
157 |
|
|
158 |
if(!cancelled) { |
|
159 |
if(taskStats != null) |
|
160 |
taskStats.actionCanceled(null); |
|
161 |
if(taskPC != null) |
|
162 |
taskPC.actionCanceled(null); |
|
163 |
} |
|
164 |
} |
|
165 |
|
|
166 |
/* |
|
167 |
* TODO: Customized panels |
|
168 |
@Override |
|
169 |
public Class<? extends GeoAlgorithmParametersPanel> getCustomParametersPanelClass() { |
|
170 |
return PrincipalComponentsParametersPanel.class; |
|
171 |
}*/ |
|
172 |
} |
|
0 | 173 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/tasseledcap/sextante/i18n/text.properties | ||
---|---|---|
1 |
multispectral=Raster multiespectral |
|
2 |
tasseledcab=Tasseled Cab |
|
3 |
use_roi=Usar las regiones de inter?s de la capa de entrada |
|
0 | 4 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/tasseledcap/sextante/i18n/text_en.properties | ||
---|---|---|
1 |
multispectral=Multispectral raster |
|
2 |
tasseledcab=Tasseled Cab |
|
3 |
use_roi=Use regions of interest of the input layer |
|
0 | 4 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.toolbox.algorithm/src/main/resources/org/gvsig/raster/tasseledcap/sextante/i18n/text.properties | ||
---|---|---|
1 |
multispectral=Raster multiespectral |
|
2 |
tasseledcab=Tasseled Cab |
|
3 |
tasseledcap=Tasseled Cab |
|
4 |
use_roi=Usar las regiones de inter?s |
|
5 |
stadistics=Estad?sticas |
|
6 |
calculating=Calculando |
|
0 | 7 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.toolbox.algorithm/src/main/resources/org/gvsig/raster/tasseledcap/sextante/i18n/text_en.properties | ||
---|---|---|
1 |
multispectral=Multispectral raster |
|
2 |
tasseledcab=Tasseled Cab |
|
3 |
tasseledcap=Tasseled Cab |
|
4 |
use_roi=Use regions of interest |
|
5 |
stadistics=Stadistics |
|
6 |
calculating=Calculating |
|
0 | 7 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.toolbox.algorithm/src/main/resources/help/TasseledCapSextanteAlgorithm.xml | ||
---|---|---|
1 |
<?xml version='1.0' encoding='ISO-8859-1' standalone='yes' ?> |
|
2 |
<help> |
|
3 |
<element name="DESCRIPTION" |
|
4 |
text="" |
|
5 |
description="Descripción" type="0"> |
|
6 |
<image description="" file=""> |
|
7 |
</image> |
|
8 |
</element> |
|
9 |
<element name="ADDITIONAL_INFO" text="" |
|
10 |
description="Información adicional" type="0"> |
|
11 |
</element> |
|
12 |
<element name="EXTENSION_AUTHOR" text="" |
|
13 |
description="Algoritmo creado por" type="0"> |
|
14 |
</element> |
|
15 |
<element name="HELP_AUTHOR" text="" description="Ayuda creada por" |
|
16 |
type="0"> |
|
17 |
</element> |
|
18 |
<element name="USER_NOTES" text="" description="Notas de usuario" |
|
19 |
type="0"> |
|
20 |
</element> |
|
21 |
</help> |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.toolbox.algorithm/src/main/resources/help/TasseledCapSextanteAlgorithm_en.xml | ||
---|---|---|
1 |
<?xml version='1.0' encoding='ISO-8859-1' standalone='yes' ?> |
|
2 |
<help> |
|
3 |
<element name="DESCRIPTION" |
|
4 |
text="" |
|
5 |
description="Descripción" type="0"> |
|
6 |
<image description="" file=""> |
|
7 |
</image> |
|
8 |
</element> |
|
9 |
<element name="ADDITIONAL_INFO" text="" |
|
10 |
description="Información adicional" type="0"> |
|
11 |
</element> |
|
12 |
<element name="EXTENSION_AUTHOR" text="" |
|
13 |
description="Algoritmo creado por" type="0"> |
|
14 |
</element> |
|
15 |
<element name="HELP_AUTHOR" text="" description="Ayuda creada por" |
|
16 |
type="0"> |
|
17 |
</element> |
|
18 |
<element name="USER_NOTES" text="" description="Notas de usuario" |
|
19 |
type="0"> |
|
20 |
</element> |
|
21 |
</help> |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.toolbox.algorithm/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.raster.tasseledcap.TasseledCapSextanteLibrary |
|
0 | 2 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.toolbox.algorithm/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
3 |
|
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<artifactId>org.gvsig.raster.tasseledcap.toolbox.algorithm</artifactId> |
|
6 |
<packaging>jar</packaging> |
|
7 |
<name>org.gvsig.raster.tasseledcap.toolbox.algorithm</name> |
|
8 |
<parent> |
|
9 |
<groupId>org.gvsig</groupId> |
|
10 |
<artifactId>org.gvsig.raster.tasseledcap</artifactId> |
|
11 |
<version>2.2.33</version> |
|
12 |
</parent> |
|
13 |
<dependencies> |
|
14 |
<dependency> |
|
15 |
<groupId>org.gvsig</groupId> |
|
16 |
<artifactId>org.gvsig.raster.algorithm</artifactId> |
|
17 |
<scope>compile</scope> |
|
18 |
</dependency> |
|
19 |
<dependency> |
|
20 |
<groupId>org.gvsig</groupId> |
|
21 |
<artifactId>org.gvsig.geoprocess.algorithm.base</artifactId> |
|
22 |
<scope>compile</scope> |
|
23 |
</dependency> |
|
24 |
<dependency> |
|
25 |
<groupId>org.gvsig</groupId> |
|
26 |
<artifactId>org.gvsig.raster.tasseledcap.algorithm</artifactId> |
|
27 |
<scope>compile</scope> |
|
28 |
</dependency> |
|
29 |
<dependency> |
|
30 |
<groupId>org.gvsig</groupId> |
|
31 |
<artifactId>org.gvsig.geoprocess.lib.sextante</artifactId> |
|
32 |
<scope>compile</scope> |
|
33 |
</dependency> |
|
34 |
<dependency> |
|
35 |
<groupId>org.gvsig</groupId> |
|
36 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
37 |
<scope>compile</scope> |
|
38 |
</dependency> |
|
39 |
<dependency> |
|
40 |
<groupId>org.gvsig</groupId> |
|
41 |
<artifactId>org.gvsig.ui</artifactId> |
|
42 |
<scope>compile</scope> |
|
43 |
</dependency> |
|
44 |
<dependency> |
|
45 |
<groupId>org.gvsig</groupId> |
|
46 |
<artifactId>org.gvsig.i18n</artifactId> |
|
47 |
<scope>compile</scope> |
|
48 |
</dependency> |
|
49 |
<dependency> |
|
50 |
<groupId>org.gvsig</groupId> |
|
51 |
<artifactId>org.gvsig.fmap.mapcontext.api</artifactId> |
|
52 |
<scope>compile</scope> |
|
53 |
</dependency> |
|
54 |
<dependency> |
|
55 |
<groupId>org.gvsig</groupId> |
|
56 |
<artifactId>org.gvsig.fmap.mapcontext.impl</artifactId> |
|
57 |
<scope>runtime</scope> |
|
58 |
</dependency> |
|
59 |
<dependency> |
|
60 |
<groupId>org.gvsig</groupId> |
|
61 |
<artifactId>org.gvsig.projection.api</artifactId> |
|
62 |
<scope>compile</scope> |
|
63 |
</dependency> |
|
64 |
<dependency> |
|
65 |
<groupId>org.gvsig</groupId> |
|
66 |
<artifactId>org.gvsig.projection.cresques.impl</artifactId> |
|
67 |
<scope>runtime</scope> |
|
68 |
</dependency> |
|
69 |
<dependency> |
|
70 |
<groupId>org.gvsig</groupId> |
|
71 |
<artifactId>org.gvsig.metadata.lib.basic.api</artifactId> |
|
72 |
<scope>compile</scope> |
|
73 |
</dependency> |
|
74 |
</dependencies> |
|
75 |
</project> |
|
0 | 76 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<artifactId>org.gvsig.raster.tasseledcap</artifactId> |
|
5 |
<packaging>pom</packaging> |
|
6 |
<version>2.2.33</version> |
|
7 |
<name>${project.artifactId}</name> |
|
8 |
<description /> |
|
9 |
<inceptionYear>2011</inceptionYear> |
|
10 |
<parent> |
|
11 |
<groupId>org.gvsig</groupId> |
|
12 |
<artifactId>org.gvsig.desktop</artifactId> |
|
13 |
<version>2.0.132</version> |
|
14 |
</parent> |
|
15 |
|
|
16 |
<properties> |
|
17 |
<!-- El plugin versions:use-latest-versions falla con scope import --> |
|
18 |
<!-- asi que toca usar el versions:update-properties que si que funciona --> |
|
19 |
<org.gvsig.raster.version>2.2.42</org.gvsig.raster.version> |
|
20 |
<org.gvsig.geoprocess.version>2.2.55</org.gvsig.geoprocess.version> |
|
21 |
</properties> |
|
22 |
|
|
23 |
<repositories> |
|
24 |
<repository> |
|
25 |
<id>gvsig-public-http-repository</id> |
|
26 |
<name>gvSIG maven public HTTP repository</name> |
|
27 |
<url>http://devel.gvsig.org/m2repo/j2se</url> |
|
28 |
<releases> |
|
29 |
<enabled>true</enabled> |
|
30 |
<updatePolicy>daily</updatePolicy> |
|
31 |
<checksumPolicy>warn</checksumPolicy> |
|
32 |
</releases> |
|
33 |
<snapshots> |
|
34 |
<enabled>true</enabled> |
|
35 |
<updatePolicy>daily</updatePolicy> |
|
36 |
<checksumPolicy>warn</checksumPolicy> |
|
37 |
</snapshots> |
|
38 |
</repository> |
|
39 |
</repositories> |
|
40 |
|
|
41 |
<scm> |
|
42 |
<connection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33</connection> |
|
43 |
<developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33</developerConnection> |
|
44 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-raster/repository/show/org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33</url> |
|
45 |
</scm> |
|
46 |
<build> |
|
47 |
<plugins> |
|
48 |
<plugin> |
|
49 |
<groupId>org.apache.maven.plugins</groupId> |
|
50 |
<artifactId>maven-release-plugin</artifactId> |
|
51 |
<configuration> |
|
52 |
<tagBase>https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.tasseledcap/tags/</tagBase> |
|
53 |
<goals>deploy</goals> |
|
54 |
</configuration> |
|
55 |
</plugin> |
|
56 |
</plugins> |
|
57 |
</build> |
|
58 |
|
|
59 |
<dependencyManagement> |
|
60 |
<dependencies> |
|
61 |
<dependency> |
|
62 |
<groupId>org.gvsig</groupId> |
|
63 |
<artifactId>org.gvsig.raster</artifactId> |
|
64 |
<version>${org.gvsig.raster.version}</version> |
|
65 |
<type>pom</type> |
|
66 |
<scope>import</scope> |
|
67 |
</dependency> |
|
68 |
|
|
69 |
<dependency> |
|
70 |
<groupId>org.gvsig</groupId> |
|
71 |
<artifactId>org.gvsig.geoprocess</artifactId> |
|
72 |
<version>${org.gvsig.geoprocess.version}</version> |
|
73 |
<type>pom</type> |
|
74 |
<scope>import</scope> |
|
75 |
</dependency> |
|
76 |
|
|
77 |
|
|
78 |
<dependency> |
|
79 |
<groupId>org.gvsig.legacy</groupId> |
|
80 |
<artifactId>jama</artifactId> |
|
81 |
<version>1.0.3</version> |
|
82 |
</dependency> |
|
83 |
|
|
84 |
<dependency> |
|
85 |
<groupId>org.gvsig</groupId> |
|
86 |
<artifactId>org.gvsig.raster.tasseledcap.lib.api</artifactId> |
|
87 |
<version>2.2.1-SNAPSHOT</version> |
|
88 |
</dependency> |
|
89 |
<dependency> |
|
90 |
<groupId>org.gvsig</groupId> |
|
91 |
<artifactId>org.gvsig.raster.tasseledcap.lib.impl</artifactId> |
|
92 |
<version>2.2.1-SNAPSHOT</version> |
|
93 |
</dependency> |
|
94 |
<dependency> |
|
95 |
<groupId>org.gvsig</groupId> |
|
96 |
<artifactId>org.gvsig.raster.tasseledcap.swing.api</artifactId> |
|
97 |
<version>2.2.33</version> |
|
98 |
</dependency> |
|
99 |
<dependency> |
|
100 |
<groupId>org.gvsig</groupId> |
|
101 |
<artifactId>org.gvsig.raster.tasseledcap.swing.impl</artifactId> |
|
102 |
<version>2.2.33</version> |
|
103 |
</dependency> |
|
104 |
<dependency> |
|
105 |
<groupId>org.gvsig</groupId> |
|
106 |
<artifactId>org.gvsig.raster.tasseledcap.algorithm</artifactId> |
|
107 |
<version>2.2.33</version> |
|
108 |
</dependency> |
|
109 |
<dependency> |
|
110 |
<groupId>org.gvsig</groupId> |
|
111 |
<artifactId>org.gvsig.raster.tasseledcap.toolbox.algorithm</artifactId> |
|
112 |
<version>2.2.33</version> |
|
113 |
</dependency> |
|
114 |
|
|
115 |
</dependencies> |
|
116 |
</dependencyManagement> |
|
117 |
<modules> |
|
118 |
<module>org.gvsig.raster.tasseledcap.algorithm</module> |
|
119 |
<module>org.gvsig.raster.tasseledcap.toolbox.algorithm</module> |
|
120 |
<module>org.gvsig.raster.tasseledcap.swing</module> |
|
121 |
<module>org.gvsig.raster.tasseledcap.app.tasseledcapclient</module> |
|
122 |
</modules> |
|
123 |
</project> |
|
0 | 124 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.algorithm/src/main/resources-plugin/org/gvsig/raster/tasseledcap/algorithm/i18n/text.properties | ||
---|---|---|
1 |
layers_dont_intersect=Las capas no intersectan |
|
2 |
roi_not_inside=La zona de estudio no esta contenida en la extensi?n de las capas |
|
3 |
preparing_buffers=Preparando buffers |
|
0 | 4 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.algorithm/src/main/resources-plugin/org/gvsig/raster/tasseledcap/algorithm/i18n/text_en.properties | ||
---|---|---|
1 |
layers_dont_intersect=Layers do not intersect |
|
2 |
roi_not_inside=The region of interest are not inside the extension of the layers |
|
3 |
preparing_buffers=Preparing buffers |
|
0 | 4 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.algorithm/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.raster.tasseledcap.algorithm.TasseledCapAlgorithmLibrary |
|
0 | 2 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.algorithm/src/main/resources/org/gvsig/raster/tasseledcap/algorithm/i18n/text.properties | ||
---|---|---|
1 |
layers_dont_intersect=Las capas no intersectan |
|
2 |
roi_not_inside=La zona de estudio no esta contenida en la extensi?n de las capas |
|
3 |
preparing_buffers=Preparando buffers |
|
4 |
writting_in_buffer=Escribiendo en buffer de salida |
|
5 |
processing_tc=Procesando Tasseled Cap |
|
6 |
tasseled_cap=Tasseled Cap |
|
7 |
type=Tipo |
|
8 |
|
|
0 | 9 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.algorithm/src/main/resources/org/gvsig/raster/tasseledcap/algorithm/i18n/text_en.properties | ||
---|---|---|
1 |
layers_dont_intersect=Layers do not intersect |
|
2 |
roi_not_inside=The region of interest are not inside the extension of the layers |
|
3 |
preparing_buffers=Preparing buffers |
|
4 |
writting_in_buffer=Writing in the output buffer |
|
5 |
processing_tc=Procesando Tasseled Cap |
|
6 |
tasseled_cap=Tasseled Cap |
|
7 |
type=Type |
|
0 | 8 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.algorithm/src/main/java/org/gvsig/raster/tasseledcap/algorithm/TasseledCapAlgorithmLibrary.java | ||
---|---|---|
1 |
package org.gvsig.raster.tasseledcap.algorithm; |
|
2 |
|
|
3 |
import org.gvsig.i18n.Messages; |
|
4 |
import org.gvsig.raster.algorithm.RasterBaseAlgorithmLibrary; |
|
5 |
import org.gvsig.tools.library.AbstractLibrary; |
|
6 |
import org.gvsig.tools.library.LibraryException; |
|
7 |
|
|
8 |
/** |
|
9 |
* Initialization of PrincipalComponentsAlgorithmLibrary library. |
|
10 |
*/ |
|
11 |
public class TasseledCapAlgorithmLibrary extends AbstractLibrary { |
|
12 |
public static final String TASSELEDCAP_PROCESS_LABEL = "TasseledCapProcess"; |
|
13 |
|
|
14 |
@Override |
|
15 |
protected void doInitialize() throws LibraryException { |
|
16 |
// Nothing to do |
|
17 |
} |
|
18 |
|
|
19 |
@Override |
|
20 |
protected void doPostInitialize() throws LibraryException { |
|
21 |
//Registers the process and its parameters |
|
22 |
RasterBaseAlgorithmLibrary.register(TASSELEDCAP_PROCESS_LABEL, TasseledCapProcess.class); |
|
23 |
TasseledCapProcess.registerParameters(); |
|
24 |
|
|
25 |
Messages.addResourceFamily( |
|
26 |
"org.gvsig.raster.tasseledcap.algorithm", |
|
27 |
TasseledCapAlgorithmLibrary.class.getClassLoader(), |
|
28 |
TasseledCapAlgorithmLibrary.class.getClass().getName()); |
|
29 |
//registerGeoProcess(new RasterReprojectAlgorithmLibrary()); |
|
30 |
|
|
31 |
Messages.addResourceFamily("org.gvsig.raster.tasseledcap.algorithm.i18n.text", |
|
32 |
TasseledCapAlgorithmLibrary.class.getClassLoader(), |
|
33 |
TasseledCapAlgorithmLibrary.class.getClass().getName()); |
|
34 |
} |
|
35 |
} |
|
0 | 36 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.algorithm/src/main/java/org/gvsig/raster/tasseledcap/algorithm/TasseledCapException.java | ||
---|---|---|
1 |
package org.gvsig.raster.tasseledcap.algorithm; |
|
2 |
|
|
3 |
import org.gvsig.raster.algorithm.process.ProcessException; |
|
4 |
|
|
5 |
|
|
6 |
/** |
|
7 |
* This exception is thrown if happen problems processing data with this algorithm. |
|
8 |
*/ |
|
9 |
public class TasseledCapException extends ProcessException { |
|
10 |
private static final long serialVersionUID = -3022090543908771484L; |
|
11 |
|
|
12 |
public TasseledCapException(String msg){ |
|
13 |
super(msg); |
|
14 |
} |
|
15 |
|
|
16 |
public TasseledCapException(String msg, Throwable e){ |
|
17 |
super(msg, e); |
|
18 |
} |
|
19 |
} |
|
0 | 20 |
org.gvsig.raster.tasseledcap/tags/org.gvsig.raster.tasseledcap-2.2.33/org.gvsig.raster.tasseledcap.algorithm/src/main/java/org/gvsig/raster/tasseledcap/algorithm/TasseledCapProcess.java | ||
---|---|---|
1 |
package org.gvsig.raster.tasseledcap.algorithm; |
|
2 |
|
|
3 |
import java.awt.geom.Rectangle2D; |
|
4 |
import java.util.List; |
|
5 |
|
|
6 |
import org.gvsig.fmap.dal.coverage.RasterLocator; |
|
7 |
import org.gvsig.fmap.dal.coverage.dataset.Buffer; |
|
8 |
import org.gvsig.fmap.dal.coverage.datastruct.Extent; |
|
9 |
import org.gvsig.fmap.dal.coverage.datastruct.NoData; |
|
10 |
import org.gvsig.fmap.dal.coverage.exception.CloneException; |
|
11 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
|
12 |
import org.gvsig.fmap.dal.coverage.exception.ROIException; |
|
13 |
import org.gvsig.fmap.dal.coverage.store.RasterDataStore; |
|
14 |
import org.gvsig.i18n.Messages; |
|
15 |
import org.gvsig.raster.algorithm.process.DataProcess; |
Also available in: Unified diff