Revision 1734
org.gvsig.raster.georeferencing/trunk/org.gvsig.raster.georeferencing/org.gvsig.raster.georeferencing.app/org.gvsig.raster.georeferencing.app.georeferencingclient/src/main/java/org/gvsig/raster/georeferencing/app/georeferencingclient/Georeferencing.java | ||
---|---|---|
332 | 332 |
if(i == geoPointList.size() - 1) |
333 | 333 |
getDataModel().getGCPList().setSelectedPoint(i); |
334 | 334 |
} |
335 |
|
|
335 |
getTableWrapper().updateErrors(); |
|
336 | 336 |
getSyncViews().redrawPoints(); |
337 | 337 |
} |
338 | 338 |
|
org.gvsig.raster.georeferencing/trunk/org.gvsig.raster.georeferencing/org.gvsig.raster.georeferencing.app/org.gvsig.raster.georeferencing.app.georeferencingclient/src/main/java/org/gvsig/raster/georeferencing/app/georeferencingclient/GeoreferencingProcessActions.java | ||
---|---|---|
119 | 119 |
process.addParam("fLayer", lyr); |
120 | 120 |
process.addParam("filename", file); |
121 | 121 |
process.addParam("method", new Integer(method)); |
122 |
process.addParam("gpcs", gpList);
|
|
123 |
process.addParam("orden", new Integer(order));
|
|
122 |
process.addParam("gcps", gpList);
|
|
123 |
process.addParam("Order", new Integer(order));
|
|
124 | 124 |
process.addParam("xCellSize", new Double(cellsizeX)); |
125 | 125 |
process.addParam("yCellSize", new Double(cellsizeY)); |
126 | 126 |
process.setActions(this); |
org.gvsig.raster.georeferencing/trunk/org.gvsig.raster.georeferencing/org.gvsig.raster.georeferencing.app/org.gvsig.raster.georeferencing.app.georeferencingclient/src/main/java/org/gvsig/raster/georeferencing/app/georeferencingclient/listener/ViewDialogListener.java | ||
---|---|---|
184 | 184 |
Georeferencing.enableTableEvent = false; |
185 | 185 |
|
186 | 186 |
try { |
187 |
|
|
188 |
//----------------- |
|
189 |
//Operaci?n de zoom |
|
190 |
if(ev.getSource() instanceof ZoomCursorGraphicLayer) { |
|
191 |
app.getSyncViews().awakeActiveTools(); |
|
192 |
return; |
|
193 |
} |
|
187 | 194 |
|
188 | 195 |
if(ev.getSource() instanceof PanTool) { |
189 | 196 |
if(ev.getParentView() != null) |
... | ... | |
228 | 235 |
Georeferencing.enableTableEvent = false; |
229 | 236 |
|
230 | 237 |
try { |
238 |
|
|
239 |
//--------------------------- |
|
240 |
//Operaci?n de cursor de zoom |
|
241 |
if(ev.getSource() instanceof ZoomCursorGraphicLayer) { |
|
242 |
app.getSyncViews().sleepActiveTools(); |
|
243 |
return; |
|
244 |
} |
|
231 | 245 |
|
232 | 246 |
//--------------------------- |
233 | 247 |
//Selecci?n de desplazamiento |
org.gvsig.raster.georeferencing/trunk/org.gvsig.raster.georeferencing/org.gvsig.raster.georeferencing.app/org.gvsig.raster.georeferencing.app.georeferencingclient/src/main/java/org/gvsig/raster/georeferencing/app/georeferencingclient/listener/ApplicationControlsListener.java | ||
---|---|---|
142 | 142 |
//------------------------------ |
143 | 143 |
//Mover el punto de control seleccionado |
144 | 144 |
if(e.getSource() == appMain.getGeorefControlPanel().getMovePointButton()) { |
145 |
if(appMain.getGeorefControlPanel().getMovePointButton().isSelected()) {
|
|
146 |
if(getSyncViews() != null) {
|
|
145 |
if(getSyncViews() != null) {
|
|
146 |
if(appMain.getGeorefControlPanel().getMovePointButton().isSelected()) {
|
|
147 | 147 |
getSyncViews().disableAllTools(); |
148 |
getSyncViews().enableTool(GeoreferencingSwingLibrary.SELECT_POINT_TOOL); |
|
149 |
} else { |
|
150 |
getSyncViews().disableTool(GeoreferencingSwingLibrary.SELECT_POINT_TOOL); |
|
148 | 151 |
} |
149 |
getSyncViews().enableTool(GeoreferencingSwingLibrary.SELECT_POINT_TOOL); |
|
150 |
} else { |
|
151 |
getSyncViews().disableTool(GeoreferencingSwingLibrary.SELECT_POINT_TOOL); |
|
152 | 152 |
} |
153 | 153 |
} |
154 | 154 |
|
155 | 155 |
//------------------------------ |
156 | 156 |
//Arrastrar y seleccionar un punto de control sobre la vista |
157 | 157 |
if(e.getSource() == appMain.getGeorefControlPanel().getDragPointButton()) { |
158 |
if(appMain.getGeorefControlPanel().getDragPointButton().isSelected()) {
|
|
159 |
if(getSyncViews() != null) {
|
|
158 |
if(getSyncViews() != null) {
|
|
159 |
if(appMain.getGeorefControlPanel().getDragPointButton().isSelected()) {
|
|
160 | 160 |
getSyncViews().disableAllTools(); |
161 |
getSyncViews().enableTool(GeoreferencingSwingLibrary.DRAG_POINT_TOOL); |
|
162 |
} else { |
|
163 |
getSyncViews().disableTool(GeoreferencingSwingLibrary.DRAG_POINT_TOOL); |
|
161 | 164 |
} |
162 |
getSyncViews().enableTool(GeoreferencingSwingLibrary.DRAG_POINT_TOOL); |
|
163 |
} else { |
|
164 |
getSyncViews().disableTool(GeoreferencingSwingLibrary.DRAG_POINT_TOOL); |
|
165 | 165 |
} |
166 | 166 |
} |
167 | 167 |
|
... | ... | |
325 | 325 |
getSyncViews().calcPointsNumeration(); |
326 | 326 |
|
327 | 327 |
//Activamos la herramienta de mover punto en la vista |
328 |
getSyncViews().enableTool(GeoreferencingSwingLibrary.SELECT_POINT_TOOL); |
|
328 |
if(getSyncViews() != null) { |
|
329 |
getSyncViews().disableAllTools(); |
|
330 |
getSyncViews().enableTool(GeoreferencingSwingLibrary.SELECT_POINT_TOOL); |
|
331 |
} |
|
329 | 332 |
|
330 | 333 |
newPointCreated = true; |
331 | 334 |
} |
... | ... | |
333 | 336 |
//----------------------------- |
334 | 337 |
//Eliminado de fila de la tabla |
335 | 338 |
if(e.getEvent() == PagedTableEvent.EVENT_REMOVE_ENTRY) { |
336 |
for (int i = 0; i >= e.getRows().length; i--) |
|
337 |
appMain.getSyncViews().removePoint(e.getRows()[i]); |
|
339 |
Object obj = ((Object[])e.getRowDeleted())[1]; |
|
340 |
int n = ((Integer)obj).intValue(); |
|
341 |
appMain.getSyncViews().removePoint(n); |
|
338 | 342 |
getSyncViews().calcPointsNumeration(); |
339 | 343 |
tableWrapper.updateErrors(); |
340 | 344 |
} |
... | ... | |
374 | 378 |
getDataModel().getGCPList().setSelectedPoint(tableWrapper.getTable().getSelectedRows()[0]); |
375 | 379 |
getSyncViews().redrawPoints(); |
376 | 380 |
} |
381 |
|
|
382 |
if(e.getEvent() == PagedTableEvent.EVENT_SWAP_ENTRIES) { |
|
383 |
getSyncViews().calcPointsNumeration(); |
|
384 |
} |
|
377 | 385 |
|
378 | 386 |
} finally { |
379 | 387 |
Georeferencing.enableTableEvent = true; |
org.gvsig.raster.georeferencing/trunk/org.gvsig.raster.georeferencing/org.gvsig.raster.georeferencing.app/org.gvsig.raster.georeferencing.app.georeferencingclient/src/main/java/org/gvsig/raster/georeferencing/app/georeferencingclient/TableWrapper.java | ||
---|---|---|
1 | 1 |
package org.gvsig.raster.georeferencing.app.georeferencingclient; |
2 | 2 |
|
3 |
import java.util.HashMap; |
|
4 |
|
|
3 | 5 |
import org.gvsig.fmap.dal.coverage.datastruct.GeoPoint; |
4 | 6 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
5 | 7 |
import org.gvsig.i18n.Messages; |
... | ... | |
92 | 94 |
* Actualiza los errores de toda la tabla. Esta funci?n debe ser llamada cuando ha |
93 | 95 |
* habido alg?n cambio en los valores de los puntos. |
94 | 96 |
*/ |
97 |
@SuppressWarnings("unchecked") |
|
95 | 98 |
public void updateErrors() { |
96 |
process.addParam("gpcs", gpList.getGeoPointList());
|
|
99 |
process.addParam("gcps", gpList.getGeoPointList());
|
|
97 | 100 |
int degree = 1; |
98 | 101 |
if(dataModel.getAlgorithm() == Georeferencing.POLYNOMIAL) |
99 | 102 |
degree = dataModel.getDegree(); |
100 |
process.addParam("orden", new Integer(degree));
|
|
103 |
process.addParam("Order", new Integer(degree));
|
|
101 | 104 |
try { |
102 | 105 |
process.execute(); |
103 | 106 |
} catch (ProcessException e) { |
... | ... | |
107 | 110 |
return; |
108 | 111 |
} catch (ProcessInterruptedException e) { |
109 | 112 |
} |
110 |
GeoTransformDataResult result = (GeoTransformDataResult)process.getResult(); |
|
113 |
HashMap<String, Object> map = (HashMap<String, Object>)process.getResult(); |
|
114 |
GeoTransformDataResult result = (GeoTransformDataResult)map.get("RESULT"); |
|
111 | 115 |
if(result == null) |
112 | 116 |
return; |
113 | 117 |
|
... | ... | |
194 | 198 |
* Obtiene el resultado de aplicar el algoritmo de transformaci?n |
195 | 199 |
* @return |
196 | 200 |
*/ |
201 |
@SuppressWarnings("unchecked") |
|
197 | 202 |
public GeoTransformDataResult getGeoTransformDataResult() { |
198 |
if(process != null) |
|
199 |
return (GeoTransformDataResult)process.getResult(); |
|
203 |
if(process != null) { |
|
204 |
HashMap<String, Object> map = (HashMap<String, Object>)process.getResult(); |
|
205 |
GeoTransformDataResult result = (GeoTransformDataResult)map.get("RESULT"); |
|
206 |
return result; |
|
207 |
} |
|
200 | 208 |
return null; |
201 | 209 |
} |
202 | 210 |
|
org.gvsig.raster.georeferencing/trunk/org.gvsig.raster.georeferencing/org.gvsig.raster.georeferencing.app/org.gvsig.raster.georeferencing.app.georeferencingclient/distribution/distribution.xml | ||
---|---|---|
29 | 29 |
<include>org.gvsig:org.gvsig.raster.georeferencing.swing.impl:jar</include> |
30 | 30 |
<include>org.gvsig:org.gvsig.raster.georeferencing.framework.api:jar</include> |
31 | 31 |
<include>org.gvsig:org.gvsig.raster.georeferencing.framework.andami:jar</include> |
32 |
<include>org.gvsig.legacy:jama:jar</include> |
|
33 |
<include>flanagan:flanagan:jar</include> |
|
32 | 34 |
</includes> |
33 | 35 |
</dependencySet> |
34 | 36 |
</dependencySets> |
org.gvsig.raster.georeferencing/trunk/org.gvsig.raster.georeferencing/org.gvsig.raster.georeferencing.lib/org.gvsig.raster.georeferencing.lib.impl/src/main/java/org/gvsig/raster/georeferencing/lib/impl/GeoTransformProcess.java | ||
---|---|---|
59 | 59 |
* @version 20/1/2008 |
60 | 60 |
*/ |
61 | 61 |
public class GeoTransformProcess extends RasterProcess { |
62 |
public static String GPCS = "Gpcs";
|
|
62 |
public static String GCPS = "gcps";
|
|
63 | 63 |
public static String ORDER = "Order"; |
64 | 64 |
public static String TIME = "Time"; |
65 | 65 |
public static String RESULT = "RESULT"; |
66 | 66 |
|
67 | 67 |
private long milis = 0; |
68 | 68 |
// Lista de puntos de control. |
69 |
private GeoPointList gpcs = null;
|
|
69 |
private GeoPointList gcps = null;
|
|
70 | 70 |
|
71 | 71 |
// porcentage del proceso global de la tarea |
72 | 72 |
private int percent = 0; |
... | ... | |
100 | 100 |
private double pixelToMapCoefY[] = null; |
101 | 101 |
|
102 | 102 |
public static void registerParameters() { |
103 |
GPCS = RasterBaseAlgorithmLibrary.registerInputParameter(GPCS, GeoPointList.class);
|
|
103 |
GCPS = RasterBaseAlgorithmLibrary.registerInputParameter(GCPS, GeoPointList.class);
|
|
104 | 104 |
ORDER = RasterBaseAlgorithmLibrary.registerInputParameter(ORDER, Integer.class); |
105 | 105 |
TIME = RasterBaseAlgorithmLibrary.registerOutputParameter(TIME, Long.class); |
106 | 106 |
} |
... | ... | |
111 | 111 |
* <LI>orden: orden del polinomio de transformacion</LI> |
112 | 112 |
*/ |
113 | 113 |
public void init() { |
114 |
gpcs = getParam(GPCS) != null ? (GeoPointList) getParam(GPCS) : null;
|
|
114 |
gcps = getParam(GCPS) != null ? (GeoPointList) getParam(GCPS) : null;
|
|
115 | 115 |
orden = (int) getIntParam(ORDER); |
116 | 116 |
minGPC = (orden + 1) * (orden + 2) / 2; |
117 | 117 |
exp = new int[minGPC][2]; |
... | ... | |
127 | 127 |
* Inicializa los valores de los errores a 0 |
128 | 128 |
*/ |
129 | 129 |
private void resetErrors() { |
130 |
for (int i = 0; i < gpcs.size(); i++)
|
|
131 |
gpcs.get(i).resetErrors();
|
|
130 |
for (int i = 0; i < gcps.size(); i++)
|
|
131 |
gcps.get(i).resetErrors();
|
|
132 | 132 |
} |
133 | 133 |
|
134 | 134 |
/** |
... | ... | |
136 | 136 |
* para la transformaci?n de orden seleccionado. false en caso contrario. |
137 | 137 |
*/ |
138 | 138 |
public boolean enoughPoints() { |
139 |
return (gpcs.size() >= minGPC);
|
|
139 |
return (gcps.size() >= minGPC);
|
|
140 | 140 |
} |
141 | 141 |
|
142 | 142 |
/** |
... | ... | |
150 | 150 |
// calculo de los resultados |
151 | 151 |
calculateRMSerror(); |
152 | 152 |
// Se almacenan los resultados en dataResult |
153 |
resultData.setGpcs(gpcs);
|
|
153 |
resultData.setGpcs(gcps);
|
|
154 | 154 |
resultData.setPixelToMapCoefX(pixelToMapCoefX); |
155 | 155 |
resultData.setPixelToMapCoefY(pixelToMapCoefY); |
156 | 156 |
resultData.setMapToPixelCoefX(mapToPixelCoefX); |
... | ... | |
195 | 195 |
for (int i = 0; i <= orden; i++) { |
196 | 196 |
for (int j = 0; j <= i; j++) { |
197 | 197 |
k++; |
198 |
for (int v = 0; v < gpcs.size(); v++) {
|
|
199 |
GeoPoint point = gpcs.get(v);
|
|
198 |
for (int v = 0; v < gcps.size(); v++) {
|
|
199 |
GeoPoint point = gcps.get(v);
|
|
200 | 200 |
if (point.isActive()) { |
201 | 201 |
matrixD[filas][k] += (Math.pow(point.getPixelPoint().getX(), i - j) * Math.pow(point.getPixelPoint().getX(), exp[filas][0])) * (Math.pow(point.getPixelPoint().getY(), j) * Math.pow(point.getPixelPoint().getY(), exp[filas][1])); |
202 | 202 |
matrixD2[filas][k] += (Math.pow(point.getMapPoint().getX(), i - j) * Math.pow(point.getMapPoint().getX(), exp[filas][0])) * (Math.pow(point.getMapPoint().getY(), j) * Math.pow(point.getMapPoint().getY(), exp[filas][1])); |
... | ... | |
208 | 208 |
exp[k][1] = j; |
209 | 209 |
|
210 | 210 |
// Se calcula el resultado de !!!!! |
211 |
for (int v = 0; v < gpcs.size(); v++) {
|
|
212 |
GeoPoint point = gpcs.get(v);
|
|
211 |
for (int v = 0; v < gcps.size(); v++) {
|
|
212 |
GeoPoint point = gcps.get(v);
|
|
213 | 213 |
if (point.isActive()) { |
214 | 214 |
result[k] += (Math.pow(point.getPixelPoint().getX(), i - j) * Math.pow(point.getPixelPoint().getX(), exp[filas][0])) * (Math.pow(point.getPixelPoint().getY(), j) * Math.pow(point.getPixelPoint().getY(), exp[filas][1])) * point.getMapPoint().getY(); |
215 | 215 |
result2[k] += (Math.pow(point.getMapPoint().getX(), i - j) * Math.pow(point.getMapPoint().getX(), exp[filas][0])) * (Math.pow(point.getMapPoint().getY(), j) * Math.pow(point.getMapPoint().getY(), exp[filas][1])) * point.getPixelPoint().getY(); |
... | ... | |
222 | 222 |
} |
223 | 223 |
} |
224 | 224 |
|
225 |
Matrix matrixResult= new Matrix(matrixD); |
|
226 |
Matrix matrixResult2= new Matrix(matrixD2); |
|
227 |
pixelToMapCoefY=solveSystem(matrixResult,result);
|
|
228 |
mapToPixelCoefY= solveSystem(matrixResult2,result2);
|
|
229 |
pixelToMapCoefX=solveSystem(matrixResult,result3);
|
|
230 |
mapToPixelCoefX= solveSystem(matrixResult2,result4);
|
|
225 |
Matrix matrixResult = new Matrix(matrixD);
|
|
226 |
Matrix matrixResult2 = new Matrix(matrixD2);
|
|
227 |
pixelToMapCoefY = solveSystem(matrixResult,result);
|
|
228 |
mapToPixelCoefY = solveSystem(matrixResult2,result2);
|
|
229 |
pixelToMapCoefX = solveSystem(matrixResult,result3);
|
|
230 |
mapToPixelCoefX = solveSystem(matrixResult2,result4);
|
|
231 | 231 |
} |
232 | 232 |
|
233 | 233 |
/** |
... | ... | |
255 | 255 |
* @return vector con los RMS |
256 | 256 |
*/ |
257 | 257 |
public void calculateRMSerror() { |
258 |
int numgpcs = gpcs.size();
|
|
258 |
int numgpcs = gcps.size();
|
|
259 | 259 |
double rmsxTotal = 0; |
260 | 260 |
double rmsyTotal = 0; |
261 | 261 |
rmsTotal = 0; |
262 | 262 |
int num = 0; |
263 | 263 |
|
264 | 264 |
for (int im_point = 0; im_point < numgpcs; im_point++) { |
265 |
GeoPoint point = gpcs.get(im_point);
|
|
265 |
GeoPoint point = gcps.get(im_point);
|
|
266 | 266 |
if (point.isActive()) { |
267 | 267 |
double tmp[] = getCoordMap(point.getPixelPoint().getX(), point.getPixelPoint().getY()); |
268 | 268 |
double tmp2[] = getCoordPixel(tmp[0], tmp[1]); |
org.gvsig.raster.georeferencing/trunk/org.gvsig.raster.georeferencing/org.gvsig.raster.georeferencing.lib/org.gvsig.raster.georeferencing.lib.impl/src/main/java/org/gvsig/raster/georeferencing/lib/impl/GeoreferencingDefaultImplLibrary.java | ||
---|---|---|
46 | 46 |
@Override |
47 | 47 |
protected void doPostInitialize() throws LibraryException { |
48 | 48 |
//Registers the process and its parameters |
49 |
RasterBaseAlgorithmLibrary.register(GeoreferencingLibrary.PROCESS_LABEL, GeoTransformProcess.class); |
|
49 |
RasterBaseAlgorithmLibrary.register(GeoreferencingLibrary.GEOTRANSFORM_PROCESS_LABEL, GeoTransformProcess.class); |
|
50 |
RasterBaseAlgorithmLibrary.register(GeoreferencingLibrary.GEOREF_PROCESS_LABEL, GeoreferencingProcess.class); |
|
50 | 51 |
GeoTransformProcess.registerParameters(); |
51 | 52 |
} |
52 | 53 |
|
org.gvsig.raster.georeferencing/trunk/org.gvsig.raster.georeferencing/org.gvsig.raster.georeferencing.lib/org.gvsig.raster.georeferencing.lib.impl/src/main/java/org/gvsig/raster/georeferencing/lib/impl/GeoreferencingProcess.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Iba?ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha) |
|
34 |
* Campus Universitario s/n |
|
35 |
* 02071 Alabacete |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 967 599 200 |
|
39 |
*/ |
|
40 |
|
|
41 |
package org.gvsig.raster.georeferencing.lib.impl; |
|
42 |
|
|
43 |
import java.awt.geom.AffineTransform; |
|
44 |
import java.io.IOException; |
|
45 |
|
|
46 |
import org.gvsig.fmap.dal.coverage.dataset.Buffer; |
|
47 |
import org.gvsig.fmap.dal.coverage.datastruct.GeoPointList; |
|
48 |
import org.gvsig.fmap.dal.coverage.datastruct.GridExtent; |
|
49 |
import org.gvsig.fmap.dal.coverage.exception.NotSupportedExtensionException; |
|
50 |
import org.gvsig.fmap.dal.coverage.exception.OutOfGridException; |
|
51 |
import org.gvsig.fmap.dal.coverage.exception.RasterBufferInvalidAccessException; |
|
52 |
import org.gvsig.fmap.dal.coverage.exception.RasterBufferInvalidException; |
|
53 |
import org.gvsig.fmap.dal.coverage.exception.RasterDriverException; |
|
54 |
import org.gvsig.fmap.dal.coverage.grid.Grid; |
|
55 |
import org.gvsig.fmap.dal.coverage.store.RasterDataStore; |
|
56 |
import org.gvsig.i18n.Messages; |
|
57 |
import org.gvsig.raster.impl.buffer.RasterBuffer; |
|
58 |
import org.gvsig.raster.impl.grid.GridInterpolated; |
|
59 |
import org.gvsig.raster.impl.process.RasterTask; |
|
60 |
import org.gvsig.raster.impl.process.RasterTaskQueue; |
|
61 |
import org.gvsig.raster.tools.algorithm.base.RasterBaseAlgorithmLibrary; |
|
62 |
import org.gvsig.raster.tools.algorithm.base.process.IProcessActions; |
|
63 |
import org.gvsig.raster.tools.algorithm.base.process.RasterProcess; |
|
64 |
|
|
65 |
/** |
|
66 |
* Clase que representa una proceso de georreferenciacion de un raster. |
|
67 |
* |
|
68 |
* @author Alejandro Mu?oz Sanchez (alejandro.munoz@uclm.es) |
|
69 |
* @version 10/2/2008 |
|
70 |
**/ |
|
71 |
public class GeoreferencingProcess extends RasterProcess implements IProcessActions { |
|
72 |
public static String STORE = "store"; |
|
73 |
public static String GCPS = "gcps"; |
|
74 |
public static String ORDER = "Order"; |
|
75 |
public static String TIME = "Time"; |
|
76 |
public static String RESULT = "RESULT"; |
|
77 |
public static String FILENAME = "filename"; |
|
78 |
public static String METHOD = "method"; |
|
79 |
public static String XCELLSIZE = "xCellSize"; |
|
80 |
public static String YCELLSIZE = "yCellSize"; |
|
81 |
|
|
82 |
//Capa a georreferenciar |
|
83 |
private RasterDataStore store = null; |
|
84 |
|
|
85 |
//Grid resultante de georreferenciacion |
|
86 |
private Grid imageGrid = null; |
|
87 |
|
|
88 |
//Fichero de salida |
|
89 |
private String filename = null; |
|
90 |
|
|
91 |
|
|
92 |
// Lista puntos de control |
|
93 |
private GeoPointList gcps = null; |
|
94 |
|
|
95 |
//Extend de imagen corregida |
|
96 |
GridExtent newExtend = null; |
|
97 |
|
|
98 |
// Metodo de resampleado utilizado |
|
99 |
private int rMethod = 0; |
|
100 |
|
|
101 |
//Indicador de progreso |
|
102 |
private int percent = 0; |
|
103 |
|
|
104 |
// Grid resultado |
|
105 |
private Grid gridResult = null; |
|
106 |
|
|
107 |
WriterBufferServer writerBufferServer = null; |
|
108 |
|
|
109 |
private int orden = 0; |
|
110 |
|
|
111 |
private int[] bands = null; |
|
112 |
|
|
113 |
//Tama?o de celda en X si es pasada por el usuario |
|
114 |
private double xCellSize = 0; |
|
115 |
//Tama?o de celda en Y si es pasada por el usuario |
|
116 |
private double yCellSize = 0; |
|
117 |
|
|
118 |
public static void registerParameters() { |
|
119 |
GCPS = RasterBaseAlgorithmLibrary.registerInputParameter(GCPS, GeoPointList.class); |
|
120 |
ORDER = RasterBaseAlgorithmLibrary.registerInputParameter(ORDER, Integer.class); |
|
121 |
TIME = RasterBaseAlgorithmLibrary.registerOutputParameter(TIME, Long.class); |
|
122 |
} |
|
123 |
|
|
124 |
/** Metodo que recoge los parametros del proceso georreferenciacion de un raster |
|
125 |
* <LI>rasterSE: capa a georeferenciar</LI> |
|
126 |
* <LI>filename: path con el fichero de salida</LI> |
|
127 |
* <LI>method: metodo de resampleo </LI> |
|
128 |
*/ |
|
129 |
public void init() { |
|
130 |
store = getParam(STORE) != null ? (RasterDataStore)getParam(STORE) : null; |
|
131 |
gcps = getParam(GCPS) != null ? (GeoPointList) getParam(GCPS) : null; |
|
132 |
filename = (String)getParam(FILENAME); |
|
133 |
rMethod = (int)getIntParam(METHOD); |
|
134 |
orden = (int)getIntParam(ORDER); |
|
135 |
bands = new int[store.getBandCount()]; |
|
136 |
xCellSize = (double)getDoubleParam("xCellSize"); |
|
137 |
yCellSize = (double)getDoubleParam("yCellSize"); |
|
138 |
|
|
139 |
for(int i = 0; i < store.getBandCount(); i++) |
|
140 |
bands[i]= i; |
|
141 |
|
|
142 |
// Inicializacion del grid correspondiente a la imagen a corregir |
|
143 |
RasterDataStore dsetCopy = null; |
|
144 |
dsetCopy = store.cloneDataStore(); |
|
145 |
BufferFactory bufferFactory = new BufferFactory(dsetCopy); |
|
146 |
bufferFactory.setReadOnly(true); |
|
147 |
try { |
|
148 |
imageGrid = new Grid(bufferFactory); |
|
149 |
}catch (RasterBufferInvalidException e) { |
|
150 |
e.printStackTrace(); |
|
151 |
} |
|
152 |
} |
|
153 |
|
|
154 |
|
|
155 |
public void process() { |
|
156 |
RasterTask task = RasterTaskQueue.get(Thread.currentThread().toString()); |
|
157 |
|
|
158 |
GeoTransformProcess transform = new GeoTransformProcess(); |
|
159 |
transform.setActions(this); |
|
160 |
transform.addParam(GCPS, gcps); |
|
161 |
transform.addParam(ORDER, new Integer(orden)); |
|
162 |
transform.run(); |
|
163 |
|
|
164 |
// Obtenida la transformacion la aplicamos a los puntos extremos de la imagen |
|
165 |
double p1[] = transform.getCoordMap(0, 0); |
|
166 |
double p2[] = transform.getCoordMap(rasterSE.getPxWidth(), 0); |
|
167 |
double p3[] = transform.getCoordMap(0, rasterSE.getPxHeight()); |
|
168 |
double p4[] = transform.getCoordMap(rasterSE.getPxWidth(), rasterSE.getPxHeight()); |
|
169 |
|
|
170 |
double xmin = Math.min(p1[0], p3[0]); |
|
171 |
double ymin = Math.min(p3[1], p4[1]); |
|
172 |
double xmax = Math.max(p2[0], p4[0]); |
|
173 |
double ymax = Math.max(p1[1], p2[1]); |
|
174 |
|
|
175 |
if(xCellSize <= 1) |
|
176 |
xCellSize = (xmax - xmin) / (double)rasterSE.getPxWidth(); |
|
177 |
if(yCellSize <= 1) |
|
178 |
yCellSize = (ymax - ymin) / (double)rasterSE.getPxHeight(); |
|
179 |
|
|
180 |
newExtend= new GridExtent(xmin, ymin, xmax, ymax, xCellSize); |
|
181 |
int datatype= rasterSE.getBufferFactory().getRasterBuf().getDataType(); |
|
182 |
|
|
183 |
try { |
|
184 |
gridResult = new Grid(newExtend, newExtend, datatype, bands); |
|
185 |
} catch (RasterBufferInvalidException e) { |
|
186 |
RasterToolsUtil.messageBoxError("error_grid", this, e); |
|
187 |
} |
|
188 |
|
|
189 |
double minPointX = gridResult.getGridExtent().getMin().getX(); |
|
190 |
double maxPointY = gridResult.getGridExtent().getMax().getY(); |
|
191 |
double cellsize = gridResult.getCellSize(); |
|
192 |
|
|
193 |
|
|
194 |
GridInterpolated gridInterpolated=null; |
|
195 |
gridInterpolated = new GridInterpolated((RasterBuffer)imageGrid.getRasterBuf(),imageGrid.getGridExtent(),imageGrid.getGridExtent(),bands); |
|
196 |
|
|
197 |
// SE ESTABLECE EL METODO DE INTERPOLACION (por defecto vecino mas proximo) |
|
198 |
if(rMethod == GridInterpolated.INTERPOLATION_BicubicSpline) |
|
199 |
gridInterpolated.setInterpolationMethod(GridInterpolated.INTERPOLATION_BicubicSpline); |
|
200 |
else if(rMethod == GridInterpolated.INTERPOLATION_Bilinear) |
|
201 |
gridInterpolated.setInterpolationMethod(GridInterpolated.INTERPOLATION_Bilinear); |
|
202 |
else |
|
203 |
gridInterpolated.setInterpolationMethod(GridInterpolated.INTERPOLATION_NearestNeighbour); |
|
204 |
|
|
205 |
double coord[] = null; |
|
206 |
try { |
|
207 |
if(datatype == Buffer.TYPE_BYTE) { |
|
208 |
byte values[] = new byte[bands.length]; |
|
209 |
int progress = 0; |
|
210 |
// OPTIMIZACION. Se esta recorriendo secuencialmente cada banda. |
|
211 |
for(int band = 0; band < bands.length; band++) { |
|
212 |
gridResult.setBandToOperate(band); |
|
213 |
gridInterpolated.setBandToOperate(band); |
|
214 |
for(int row = 0; row < gridResult.getLayerNY(); row++) { |
|
215 |
progress++; |
|
216 |
for(int col = 0; col < gridResult.getLayerNX(); col++) { |
|
217 |
coord = transform.getCoordPixel(col * cellsize+minPointX, maxPointY - row * cellsize); |
|
218 |
values[band] = (byte)gridInterpolated._getValueAt(coord[0], coord[1]); |
|
219 |
gridResult.setCellValue(col,row,(byte)values[band]); |
|
220 |
} |
|
221 |
percent=(int)(progress * 100 / (gridResult.getLayerNY() * bands.length)); |
|
222 |
if(task.getEvent() != null) |
|
223 |
task.manageEvent(task.getEvent()); |
|
224 |
} |
|
225 |
} |
|
226 |
} |
|
227 |
|
|
228 |
if(datatype == Buffer.TYPE_SHORT) { |
|
229 |
short values[] = new short[bands.length]; |
|
230 |
int progress = 0; |
|
231 |
// OPTIMIZACION. Se esta recorriendo secuencialmente cada banda. |
|
232 |
for(int band = 0; band < bands.length; band++) { |
|
233 |
gridResult.setBandToOperate(band); |
|
234 |
gridInterpolated.setBandToOperate(band); |
|
235 |
for(int row = 0; row < gridResult.getLayerNY(); row++) { |
|
236 |
progress++; |
|
237 |
for(int col = 0; col < gridResult.getLayerNX(); col++) { |
|
238 |
coord=transform.getCoordPixel(col * cellsize+minPointX, maxPointY - row * cellsize); |
|
239 |
values[band] = (short)gridInterpolated._getValueAt(coord[0], coord[1]); |
|
240 |
gridResult.setCellValue(col, row, (short)values[band]); |
|
241 |
} |
|
242 |
percent=(int)(progress * 100 / (gridResult.getLayerNY() * bands.length)); |
|
243 |
if(task.getEvent() != null) |
|
244 |
task.manageEvent(task.getEvent()); |
|
245 |
} |
|
246 |
} |
|
247 |
} |
|
248 |
|
|
249 |
if(datatype == Buffer.TYPE_INT) { |
|
250 |
int values[] = new int[bands.length]; |
|
251 |
int progress = 0; |
|
252 |
// OPTIMIZACION. Se esta recorriendo secuencialmente cada banda. |
|
253 |
for(int band = 0; band < bands.length; band++) { |
|
254 |
gridResult.setBandToOperate(band); |
|
255 |
gridInterpolated.setBandToOperate(band); |
|
256 |
for(int row = 0; row < gridResult.getLayerNY(); row++){ |
|
257 |
progress++; |
|
258 |
for(int col = 0; col < gridResult.getLayerNX(); col++) { |
|
259 |
coord = transform.getCoordPixel(col * cellsize + minPointX, maxPointY - row * cellsize); |
|
260 |
values[band] = (int)gridInterpolated._getValueAt(coord[0], coord[1]); |
|
261 |
gridResult.setCellValue(col, row, (int)values[band]); |
|
262 |
} |
|
263 |
percent=(int)( progress*100/(gridResult.getLayerNY()*bands.length)); |
|
264 |
if(task.getEvent() != null) |
|
265 |
task.manageEvent(task.getEvent()); |
|
266 |
} |
|
267 |
} |
|
268 |
} |
|
269 |
|
|
270 |
if(datatype == Buffer.TYPE_FLOAT) { |
|
271 |
float values[] = new float[bands.length]; |
|
272 |
int progress = 0; |
|
273 |
// OPTIMIZACION. Se esta recorriendo secuencialmente cada banda. |
|
274 |
for(int band = 0; band < bands.length; band++) { |
|
275 |
gridResult.setBandToOperate(band); |
|
276 |
gridInterpolated.setBandToOperate(band); |
|
277 |
for(int row = 0; row < gridResult.getLayerNY(); row++) { |
|
278 |
progress++; |
|
279 |
for(int col = 0; col < gridResult.getLayerNX(); col++) { |
|
280 |
coord = transform.getCoordPixel(col * cellsize + minPointX, maxPointY - row * cellsize); |
|
281 |
values[band] = (float)gridInterpolated._getValueAt(coord[0], coord[1]); |
|
282 |
gridResult.setCellValue(col, row, (float)values[band]); |
|
283 |
} |
|
284 |
percent=(int)(progress * 100 / (gridResult.getLayerNY() * bands.length)); |
|
285 |
if(task.getEvent() != null) |
|
286 |
task.manageEvent(task.getEvent()); |
|
287 |
} |
|
288 |
} |
|
289 |
} |
|
290 |
|
|
291 |
if(datatype == Buffer.TYPE_DOUBLE) { |
|
292 |
double values[] = new double[bands.length]; |
|
293 |
int progress = 0; |
|
294 |
// OPTIMIZACION. Se esta recorriendo secuencialmente cada banda. |
|
295 |
for(int band = 0; band < bands.length; band++) { |
|
296 |
gridResult.setBandToOperate(band); |
|
297 |
gridInterpolated.setBandToOperate(band); |
|
298 |
for(int row = 0; row < gridResult.getLayerNY(); row++) { |
|
299 |
progress++; |
|
300 |
for(int col = 0; col < gridResult.getLayerNX(); col++) { |
|
301 |
coord = transform.getCoordPixel(col * cellsize + minPointX, maxPointY - row * cellsize); |
|
302 |
values[band] = (double)gridInterpolated._getValueAt(coord[0], coord[1]); |
|
303 |
gridResult.setCellValue(col, row, (double)values[band]); |
|
304 |
} |
|
305 |
percent=(int)( progress * 100 / (gridResult.getLayerNY() * bands.length)); |
|
306 |
if(task.getEvent() != null) |
|
307 |
task.manageEvent(task.getEvent()); |
|
308 |
} |
|
309 |
} |
|
310 |
} |
|
311 |
|
|
312 |
} catch (OutOfGridException e) { |
|
313 |
e.printStackTrace(); |
|
314 |
} catch (RasterBufferInvalidAccessException e) { |
|
315 |
e.printStackTrace(); |
|
316 |
} catch (RasterBufferInvalidException e) { |
|
317 |
e.printStackTrace(); |
|
318 |
} |
|
319 |
|
|
320 |
generateLayer(); |
|
321 |
if(externalActions!=null) |
|
322 |
externalActions.end(filename); |
|
323 |
} |
|
324 |
|
|
325 |
|
|
326 |
private void generateLayer() { |
|
327 |
|
|
328 |
GeoRasterWriter grw = null; |
|
329 |
IBuffer buffer= gridResult.getRasterBuf(); |
|
330 |
writerBufferServer = new WriterBufferServer(buffer); |
|
331 |
AffineTransform aTransform = new AffineTransform(newExtend.getCellSize(), 0.0, 0.0, -newExtend.getCellSize(), newExtend.getMin().getX(), newExtend.getMax().getY()); |
|
332 |
int endIndex = filename.lastIndexOf("."); |
|
333 |
if (endIndex < 0) |
|
334 |
endIndex = filename.length(); |
|
335 |
try { |
|
336 |
grw = GeoRasterWriter.getWriter(writerBufferServer, filename,gridResult.getRasterBuf().getBandCount(),aTransform, gridResult.getRasterBuf().getWidth(),gridResult.getRasterBuf().getHeight(), gridResult.getRasterBuf().getDataType(), GeoRasterWriter.getWriter(filename).getParams(),null); |
|
337 |
grw.dataWrite(); |
|
338 |
grw.setWkt(rasterSE.getWktProjection()); |
|
339 |
grw.writeClose(); |
|
340 |
} catch (NotSupportedExtensionException e1) { |
|
341 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_writer_notsupportedextension"), this, e1); |
|
342 |
} catch (RasterDriverException e1) { |
|
343 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_writer"), this, e1); |
|
344 |
} catch (IOException e) { |
|
345 |
RasterToolsUtil.messageBoxError("error_salvando_rmf", this, e); |
|
346 |
} catch (InterruptedException e) { |
|
347 |
Thread.currentThread().interrupt(); |
|
348 |
} |
|
349 |
} |
|
350 |
|
|
351 |
|
|
352 |
/* |
|
353 |
* (non-Javadoc) |
|
354 |
* @see org.gvsig.gui.beans.incrementabletask.IIncrementable#getTitle() |
|
355 |
*/ |
|
356 |
public String getTitle() { |
|
357 |
return Messages.getText("georreferenciacion_process"); |
|
358 |
} |
|
359 |
|
|
360 |
/* |
|
361 |
* (non-Javadoc) |
|
362 |
* @see org.gvsig.gui.beans.incrementabletask.IIncrementable#getLabel() |
|
363 |
*/ |
|
364 |
public int getPercent() { |
|
365 |
if(writerBufferServer == null) |
|
366 |
return percent; |
|
367 |
else |
|
368 |
return writerBufferServer.getPercent(); |
|
369 |
} |
|
370 |
|
|
371 |
|
|
372 |
/* |
|
373 |
* (non-Javadoc) |
|
374 |
* @see org.gvsig.gui.beans.incrementabletask.IIncrementable#getLabel() |
|
375 |
*/ |
|
376 |
public String getLog() { |
|
377 |
return Messages.getText("georreferencing_log_message"); |
|
378 |
} |
|
379 |
|
|
380 |
|
|
381 |
public void interrupted() { |
|
382 |
// TODO Auto-generated method stub |
|
383 |
} |
|
384 |
|
|
385 |
public void end(Object param) { |
|
386 |
} |
|
387 |
|
|
388 |
} |
|
0 | 389 |
org.gvsig.raster.georeferencing/trunk/org.gvsig.raster.georeferencing/org.gvsig.raster.georeferencing.lib/org.gvsig.raster.georeferencing.lib.api/src/main/java/org/gvsig/raster/georeferencing/GeoreferencingLibrary.java | ||
---|---|---|
31 | 31 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
32 | 32 |
*/ |
33 | 33 |
public class GeoreferencingLibrary extends AbstractLibrary { |
34 |
public static final String PROCESS_LABEL = "GeoreferencingProcess"; |
|
34 |
public static final String GEOTRANSFORM_PROCESS_LABEL = "GeotransformProcess"; |
|
35 |
public static final String GEOREF_PROCESS_LABEL = "GeoreferencingProcess"; |
|
35 | 36 |
|
36 | 37 |
public GeoreferencingLibrary() { |
37 | 38 |
registerAsAPI(GeoreferencingLibrary.class); |
org.gvsig.raster.georeferencing/trunk/org.gvsig.raster.georeferencing/pom.xml | ||
---|---|---|
104 | 104 |
<dependency> |
105 | 105 |
<groupId>org.gvsig.legacy</groupId> |
106 | 106 |
<artifactId>jama</artifactId> |
107 |
<version>1.0.2</version>
|
|
107 |
<version>1.0.3</version>
|
|
108 | 108 |
</dependency> |
109 | 109 |
<dependency> |
110 | 110 |
<groupId>org.gvsig</groupId> |
org.gvsig.raster.georeferencing/trunk/org.gvsig.raster.georeferencing/org.gvsig.raster.georeferencing.swing/org.gvsig.raster.georeferencing.swing.impl/src/main/java/org/gvsig/raster/georeferencing/swing/impl/DefaultGeoreferencingSwingManager.java | ||
---|---|---|
110 | 110 |
syncViews.setRequestsManager(viewMan[0], viewMan[1], viewMan[2], viewMan[3]); |
111 | 111 |
syncViews.setViews(views[0], views[1], views[2], views[3], table); |
112 | 112 |
syncViews.setControlPanel(control); |
113 |
syncViews.disableAllTools(); |
|
113 | 114 |
return syncViews; |
114 | 115 |
} |
115 | 116 |
|
org.gvsig.raster.georeferencing/trunk/org.gvsig.raster.georeferencing/org.gvsig.raster.georeferencing.swing/org.gvsig.raster.georeferencing.swing.impl/src/main/java/org/gvsig/raster/georeferencing/swing/impl/view/CanvasZone.java | ||
---|---|---|
326 | 326 |
Rectangle2D ext = getCanvasExtent(w, h, scale); |
327 | 327 |
|
328 | 328 |
if(lastImage == null || !equal(lastExtent, ext)) { |
329 |
lastImage = new BufferedImage((int)w, (int)h, BufferedImage.TYPE_INT_ARGB);
|
|
329 |
lastImage = new BufferedImage((int)w, (int)h, BufferedImage.TYPE_INT_RGB); |
|
330 | 330 |
lastImageWithLayers = new BufferedImage((int)w, (int)h, BufferedImage.TYPE_INT_RGB); |
331 | 331 |
} else if(!panAT.isIdentity()) { |
332 | 332 |
//Cuando se hace un Pan se dibuja el fondo y un imagen superpuesta transparente |
org.gvsig.raster.georeferencing/trunk/org.gvsig.raster.georeferencing/org.gvsig.raster.georeferencing.swing/org.gvsig.raster.georeferencing.swing.impl/src/main/java/org/gvsig/raster/georeferencing/swing/impl/view/ViewControl.java | ||
---|---|---|
766 | 766 |
*/ |
767 | 767 |
public void endAction(ToolEvent ev) { |
768 | 768 |
if(ev.getSource() instanceof ZoomRectangleTool || ev.getSource() instanceof PanTool) { |
769 |
Rectangle2D extent = (Rectangle2D)getCanvas().getSelectedTool().getResult(); |
|
770 |
try { |
|
771 |
if(extReq != null) |
|
772 |
extReq.request(extent); |
|
773 |
} catch (InvalidRequestException e1) { |
|
774 |
GeoreferencingSwingImplLibrary.messageBoxError("error_setview_preview", this); |
|
769 |
if(getCanvas().getSelectedTool().getResult() instanceof Rectangle2D) { |
|
770 |
Rectangle2D extent = (Rectangle2D)getCanvas().getSelectedTool().getResult(); |
|
771 |
try { |
|
772 |
if(extReq != null) |
|
773 |
extReq.request(extent); |
|
774 |
} catch (InvalidRequestException e1) { |
|
775 |
GeoreferencingSwingImplLibrary.messageBoxError("error_setview_preview", this); |
|
776 |
} |
|
775 | 777 |
} |
776 | 778 |
} |
777 | 779 |
} |
org.gvsig.raster.georeferencing/trunk/org.gvsig.raster.georeferencing/org.gvsig.raster.georeferencing.swing/org.gvsig.raster.georeferencing.swing.impl/src/main/java/org/gvsig/raster/georeferencing/swing/impl/view/synchronize/SynchronizationViewImpl.java | ||
---|---|---|
118 | 118 |
if(viewMap != null) |
119 | 119 |
((BaseViewPanel)viewMap).disableAllTools(); |
120 | 120 |
setActiveLayerPoints(false); |
121 |
controlPanel.getDragPointButton().setSelected(false); |
|
122 |
controlPanel.getMovePointButton().setSelected(false); |
|
121 | 123 |
} |
122 | 124 |
|
123 | 125 |
public void disableTool(int tool) { |
126 |
if(tool == GeoreferencingSwingLibrary.MOVE_POINT_TOOL) |
|
127 |
tool = GeoreferencingSwingLibrary.SELECT_POINT_TOOL; |
|
124 | 128 |
if(zoomMap != null) |
125 | 129 |
((BaseViewPanel)zoomMap).disableTool(tool); |
126 | 130 |
if(zoomRaster != null) |
... | ... | |
133 | 137 |
controlPanel.getDragPointButton().setSelected(false); |
134 | 138 |
setActiveLayerPoints(false); |
135 | 139 |
} |
136 |
if(tool == GeoreferencingSwingLibrary.MOVE_POINT_TOOL) {
|
|
140 |
if(tool == GeoreferencingSwingLibrary.SELECT_POINT_TOOL) {
|
|
137 | 141 |
controlPanel.getMovePointButton().setSelected(false); |
138 | 142 |
} |
139 | 143 |
} |
... | ... | |
177 | 181 |
} |
178 | 182 |
|
179 | 183 |
public void enableTool(int tool) { |
184 |
if(tool == GeoreferencingSwingLibrary.MOVE_POINT_TOOL) |
|
185 |
tool = GeoreferencingSwingLibrary.SELECT_POINT_TOOL; |
|
180 | 186 |
if(zoomMap != null) |
181 | 187 |
((BaseViewPanel)zoomMap).enableTool(tool); |
182 | 188 |
if(zoomRaster != null) |
... | ... | |
189 | 195 |
controlPanel.getDragPointButton().setSelected(true); |
190 | 196 |
setActiveLayerPoints(true); |
191 | 197 |
} |
192 |
if(tool == GeoreferencingSwingLibrary.MOVE_POINT_TOOL) {
|
|
198 |
if(tool == GeoreferencingSwingLibrary.SELECT_POINT_TOOL) {
|
|
193 | 199 |
controlPanel.getMovePointButton().setSelected(true); |
194 | 200 |
} |
195 | 201 |
} |
Also available in: Unified diff