Ignore:
Timestamp:
2009-10-18T18:11:09+02:00 (15 years ago)
Author:
pieren
Message:

Use the new cadastre projection LambertCC9Zones

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLambertZone.java

    r13611 r18207  
    1414import org.openstreetmap.josm.actions.JosmAction;
    1515import org.openstreetmap.josm.data.projection.Lambert;
     16import org.openstreetmap.josm.data.projection.LambertCC9Zones;
    1617import org.openstreetmap.josm.tools.GBC;
    1718
     
    2223    public static String name = "Change Lambert zone";
    2324
     25    public static String[] lambert4zones = { "", "1 (51.30 to 48.15 degrees)", "2 (48.15 to 45.45 degrees)", "3 (45.45 to 42.76 degrees)", "4 (Corsica)" };
     26    public static String[] lambert9zones = { "", "1 (41 to 43 degrees)", "2 (42 to 44 degrees)",
     27            "3 (43 to 45 degrees)", "4 (44 to 46 degrees)", "5 (45 to 47 degrees)",
     28            "6 (46 to 48 degrees)", "7 (47 to 49 degrees)", "8 (48 to 50 degrees)",
     29            "9 (49 to 51 degrees)" };
     30
    2431    public MenuActionLambertZone() {
    25         super(tr(name), "cadastre_small", tr("Set manually the Lambert zone (e.g. for locations between two zones)"),
     32        super(tr(name), "cadastre_small", tr("Set manually the Lambert zone"),
    2633                null, false);
    2734    }
     
    2936    public void actionPerformed(ActionEvent e) {
    3037        JPanel p = new JPanel(new GridBagLayout());
    31         String[] zones = { "", "1 (51.30 to 48.15 degrees)", "2 (48.15 to 45.45 degrees)", "3 (45.45 to 42.76 degrees)", "4 (Corsica)" };
    32         final JComboBox inputLambertZone = new JComboBox(zones);
     38        final JComboBox inputLambertZone;
     39        if (Main.proj instanceof LambertCC9Zones)
     40            inputLambertZone = new JComboBox(lambert9zones);
     41        else
     42            inputLambertZone = new JComboBox(lambert4zones);
    3343        JLabel newLambertZone = new JLabel(tr("Zone"));
    3444        p.add(newLambertZone, GBC.std());
     
    4757        if (inputLambertZone.getSelectedIndex() > 0) {
    4858            Lambert.layoutZone = inputLambertZone.getSelectedIndex() - 1;
     59            LambertCC9Zones.layoutZone = Lambert.layoutZone;
    4960        }
    5061    }
Note: See TracChangeset for help on using the changeset viewer.