source: osm/applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionRefineGeoRef.java@ 29922

Last change on this file since 29922 was 29722, checked in by pieren, 12 years ago

remove image cropping in georef refinement.

File size: 1.3 KB
Line 
1package cadastre_fr;
2
3import static org.openstreetmap.josm.tools.I18n.tr;
4import static org.openstreetmap.josm.tools.I18n.marktr;
5
6import java.awt.event.ActionEvent;
7
8import javax.swing.JOptionPane;
9
10import org.openstreetmap.josm.Main;
11import org.openstreetmap.josm.actions.JosmAction;
12
13@SuppressWarnings("serial")
14public class MenuActionRefineGeoRef extends JosmAction {
15
16 public static String name = marktr("Refine georeferencing");
17
18 private WMSLayer wmsLayer;
19 private RasterImageGeoreferencer rasterImageGeoreferencer;
20
21 public MenuActionRefineGeoRef(WMSLayer wmsLayer) {
22 super(tr(name), null, tr("Improve georeferencing (only raster images)"), null, false);
23 this.wmsLayer = wmsLayer;
24 rasterImageGeoreferencer = new RasterImageGeoreferencer();
25 }
26
27 @Override
28 public void actionPerformed(ActionEvent arg0) {
29 if(!wmsLayer.isRaster())
30 {
31 System.out.println("MenuActionRefineGeoRef called for unexpected layer type");
32 return;
33 }
34 if (CadastrePlugin.isCadastreProjection()) {
35 //wmsLayer = WMSDownloadAction.getLayer();
36 } else {
37 CadastrePlugin.askToChangeProjection();
38 }
39 rasterImageGeoreferencer.addListener();
40 rasterImageGeoreferencer.startGeoreferencing(wmsLayer);
41 }
42
43}
Note: See TracBrowser for help on using the repository browser.