Revision 12546 trunk/extensions/extGeoreferencing/src/org/gvsig/georeferencing/gui/dialog/GeoreferencingDialog.java
GeoreferencingDialog.java | ||
---|---|---|
41 | 41 |
import javax.swing.table.DefaultTableModel; |
42 | 42 |
|
43 | 43 |
import org.cresques.cts.IProjection; |
44 |
import org.cresques.px.Extent;
|
|
44 |
import org.gvsig.fmap.raster.layers.FLyrRasterSE;
|
|
45 | 45 |
import org.gvsig.georeferencing.GeoOperations; |
46 | 46 |
import org.gvsig.georeferencing.gui.listeners.GeoRasterFrameListener; |
47 | 47 |
import org.gvsig.georeferencing.gui.listeners.GeorefMovePointListener; |
... | ... | |
60 | 60 |
import org.gvsig.georeferencing.utils.GeoUtils; |
61 | 61 |
import org.gvsig.georeferencing.utils.PointManager; |
62 | 62 |
import org.gvsig.georeferencing.utils.StackZoom; |
63 |
import org.gvsig.raster.datastruct.Extent; |
|
63 | 64 |
|
64 | 65 |
import com.iver.andami.PluginServices; |
65 | 66 |
import com.iver.cit.gvsig.fmap.MapControl; |
66 | 67 |
import com.iver.cit.gvsig.fmap.ViewPort; |
67 |
import com.iver.cit.gvsig.fmap.drivers.RasterDriver; |
|
68 | 68 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
69 | 69 |
import com.iver.cit.gvsig.fmap.layers.FLyrGeoRaster; |
70 | 70 |
import com.iver.cit.gvsig.fmap.layers.FLyrPoints; |
71 |
import com.iver.cit.gvsig.fmap.layers.FLyrRaster; |
|
72 | 71 |
import com.iver.cit.gvsig.fmap.layers.IGeoUi; |
73 |
import com.iver.cit.gvsig.fmap.layers.RasterFileAdapter; |
|
74 | 72 |
import com.iver.cit.gvsig.fmap.tools.ZoomOutRightButtonListener; |
75 | 73 |
import com.iver.cit.gvsig.fmap.tools.Behavior.Behavior; |
76 | 74 |
import com.iver.cit.gvsig.fmap.tools.Behavior.DraggedBehavior; |
... | ... | |
479 | 477 |
go.setCreateWorldFile(this.createWorldFile); |
480 | 478 |
go.createGeorefFile( (int)getLyrGeoRaster().getImageWidth(), |
481 | 479 |
(int)getLyrGeoRaster().getImageHeight(), |
482 |
getLyrGeoRaster().getSource().getFiles()[0].getName());
|
|
480 |
getLyrGeoRaster().getFileName()[0]);
|
|
483 | 481 |
|
484 | 482 |
FLayers lyrs = this.getLyrGeoRaster().getParentLayer(); |
485 | 483 |
|
... | ... | |
488 | 486 |
|
489 | 487 |
//Eliminamos la capa |
490 | 488 |
lyrs.removeLayer(i); |
491 |
File fich = new File(getLyrGeoRaster().getSource().getFiles()[0].getName());
|
|
489 |
File fich = new File(getLyrGeoRaster().getFileName()[0]);
|
|
492 | 490 |
//Creamos la nueva capa GeoRaster y la a?adimos al TOC. |
493 |
FLyrRaster lyrRaster = GeoLayerFactory.createLayer(getLyrGeoRaster().getName().substring(1, getLyrGeoRaster().getName().length()), |
|
494 |
(RasterDriver)getLyrGeoRaster().getSource().getDriver(), |
|
495 |
fich, |
|
491 |
FLyrRasterSE lyrRaster = GeoLayerFactory.createLayer(getLyrGeoRaster().getName().substring(1, getLyrGeoRaster().getName().length()), |
|
492 |
getLyrGeoRaster().getFileName()[0], |
|
496 | 493 |
getLyrGeoRaster().getProjection()); |
497 | 494 |
lyrs.addLayer(lyrRaster); |
498 | 495 |
theView.getMapControl().getMapContext().invalidate(); |
... | ... | |
533 | 530 |
|
534 | 531 |
if(messageBoxYesOrNot("cargar_puntos")){ |
535 | 532 |
String name = lyrGeoRaster.getName().substring(lyrGeoRaster.getName().indexOf("*") + 1, lyrGeoRaster.getName().lastIndexOf(".")); |
536 |
String path = ((RasterFileAdapter)lyrGeoRaster.getSource()).getFile().getAbsolutePath();
|
|
533 |
String path = lyrGeoRaster.getFileName()[0];
|
|
537 | 534 |
String nameRmf = path.substring(0, path.lastIndexOf(File.separator) + 1) + name + ".rmf"; |
538 | 535 |
|
539 | 536 |
//Antes de cargar puntos plegamos el cuadro |
... | ... | |
564 | 561 |
if(getLyrPoints() == null) |
565 | 562 |
throw new Exception("LyrPoints not loaded."); |
566 | 563 |
String name = lyrGeoRaster.getName().substring(lyrGeoRaster.getName().indexOf("*") + 1, lyrGeoRaster.getName().lastIndexOf(".")); |
567 |
String path = ((RasterFileAdapter)lyrGeoRaster.getSource()).getFile().getAbsolutePath();
|
|
564 |
String path = lyrGeoRaster.getFileName()[0];
|
|
568 | 565 |
String nameRmf = path.substring(0, path.lastIndexOf(File.separator) + 1) + name + ".rmf"; |
569 | 566 |
|
570 | 567 |
File f = new File(nameRmf); |
... | ... | |
691 | 688 |
|
692 | 689 |
getLyrPoints().getPoint(j).leftCenterPoint = newCenter; |
693 | 690 |
|
694 |
ViewPort vpOld = getLyrPoints().getPoint(j).leftViewPort;
|
|
691 |
ViewPort vpOld = getLyrPoints().getPoint(j).lvp;
|
|
695 | 692 |
Rectangle2D newExtent = new Rectangle2D.Double( vpOld.getExtent().getMinX() - diffX, |
696 | 693 |
vpOld.getExtent().getMinY() - diffY, |
697 | 694 |
vpOld.getExtent().getWidth(), |
... | ... | |
700 | 697 |
vpNew.setExtent(newExtent); |
701 | 698 |
vpNew.setImageSize(vpOld.getImageSize()); |
702 | 699 |
vpNew.refreshExtent(); |
703 |
getLyrPoints().getPoint(j).leftViewPort = vpNew;
|
|
700 |
getLyrPoints().getPoint(j).setLeftViewPort(vpNew);
|
|
704 | 701 |
} |
705 | 702 |
} |
706 | 703 |
|
Also available in: Unified diff