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

Last change on this file since 33047 was 33047, checked in by donvip, 8 years ago

findbugs

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