Revision 19304
trunk/extensions/extGeoreferencing/src/org/gvsig/georeferencing/process/GeoreferencingProcess.java | ||
---|---|---|
139 | 139 |
|
140 | 140 |
public void process() throws InterruptedException { |
141 | 141 |
|
142 |
//COMENTAR: Podiamos ahorrarlo si le pasamos ya un geoTransformDataResult |
|
143 | 142 |
GeoTransformProcess transform = new GeoTransformProcess(); |
144 | 143 |
transform.setActions(this); |
145 | 144 |
transform.addParam("gpcs",gpcs); |
... | ... | |
151 | 150 |
double p2[]=transformData.getCoordMap(imageGrid.getGridExtent().getULX(),imageGrid.getGridExtent().getULY()); |
152 | 151 |
double p3[]=transformData.getCoordMap(imageGrid.getGridExtent().getURX(),imageGrid.getGridExtent().getURY()); |
153 | 152 |
double p4[]=transformData.getCoordMap(imageGrid.getGridExtent().getLRX(),imageGrid.getGridExtent().getLRY()); |
154 |
|
|
155 | 153 |
|
156 | 154 |
double xmin=Math.min( Math.min(p1[0],p2[0]),Math.min(p3[0],p4[0])); |
157 | 155 |
double ymin=Math.min( Math.min(p1[1],p2[1]),Math.min(p3[1],p4[1])); |
... | ... | |
187 | 185 |
double coord[]=null; |
188 | 186 |
try { |
189 | 187 |
|
190 |
// Caso imagen tipo byte. Usando metodo de vecino mas proximo |
|
191 | 188 |
if(datatype==IBuffer.TYPE_BYTE) |
192 | 189 |
{ |
193 | 190 |
byte values[]=new byte[bands.length]; |
... | ... | |
205 | 202 |
} |
206 | 203 |
} |
207 | 204 |
|
208 |
// Caso imagen tipo short |
|
209 | 205 |
if(datatype==IBuffer.TYPE_SHORT) |
210 | 206 |
{ |
211 | 207 |
short values[]=new short[bands.length]; |
... | ... | |
223 | 219 |
} |
224 | 220 |
} |
225 | 221 |
|
226 |
// Caso imagen tipo int |
|
227 | 222 |
if(datatype==IBuffer.TYPE_INT) |
228 | 223 |
{ |
229 | 224 |
int values[]=new int[bands.length]; |
... | ... | |
241 | 236 |
} |
242 | 237 |
} |
243 | 238 |
|
244 |
// Caso imagen tipo float |
|
245 | 239 |
if(datatype==IBuffer.TYPE_FLOAT) |
246 | 240 |
{ |
247 | 241 |
float values[]=new float[bands.length]; |
... | ... | |
259 | 253 |
} |
260 | 254 |
} |
261 | 255 |
|
262 |
// Caso imagen tipo double |
|
263 | 256 |
if(datatype==IBuffer.TYPE_DOUBLE) |
264 | 257 |
{ |
265 | 258 |
double values[]=new double[bands.length]; |
... | ... | |
293 | 286 |
} |
294 | 287 |
|
295 | 288 |
|
296 |
private void generateLayer(){ |
|
297 |
|
|
289 |
private void generateLayer(){
|
|
290 |
|
|
298 | 291 |
GeoRasterWriter grw = null; |
299 | 292 |
IBuffer buffer= gridResult.getRasterBuf(); |
300 | 293 |
writerBufferServer = new WriterBufferServer(buffer); |
... | ... | |
310 | 303 |
} catch (NotSupportedExtensionException e1) { |
311 | 304 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_writer_notsupportedextension"), this, e1); |
312 | 305 |
} catch (RasterDriverException e1) { |
313 |
e1.printStackTrace();
|
|
306 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_writer"), this, e1);
|
|
314 | 307 |
} catch (IOException e) { |
315 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_writer"), this, e);
|
|
308 |
RasterToolsUtil.messageBoxError("error_salvando_rmf", this, e);
|
|
316 | 309 |
} catch (InterruptedException e) { |
317 | 310 |
Thread.currentThread().interrupt(); |
318 | 311 |
} |
319 | 312 |
} |
320 | 313 |
|
321 |
|
|
322 |
|
|
323 |
|
|
314 |
|
|
324 | 315 |
/* |
325 | 316 |
* (non-Javadoc) |
326 | 317 |
* @see org.gvsig.gui.beans.incrementabletask.IIncrementable#getTitle() |
... | ... | |
343 | 334 |
|
344 | 335 |
|
345 | 336 |
public void interrupted() { |
346 |
// TODO Auto-generated method stub |
|
347 |
|
|
337 |
// TODO Auto-generated method stub |
|
348 | 338 |
} |
349 | 339 |
|
350 | 340 |
public void end(Object param) { |
Also available in: Unified diff