Ignore:
Timestamp:
2009-11-21T00:18:50+01:00 (17 years ago)
Author:
pieren
Message:

Add subprojection handling

File:
1 edited

Legend:

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

    r18547 r18720  
    2525import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
    2626import org.openstreetmap.josm.plugins.Plugin;
     27import org.openstreetmap.josm.data.coor.EastNorth;
     28import org.openstreetmap.josm.data.coor.LatLon;
    2729import org.openstreetmap.josm.data.projection.*;
    2830
     
    129131
    130132        UploadAction.registerUploadHook(new CheckSourceUploadHook());
     133       
     134        Lambert proj = new Lambert();
     135        LatLon ll = new LatLon(48.559902360278954, 7.75309953770033);
     136        EastNorth ea = proj.latlon2eastNorth(ll);
     137        System.out.println(ea);
    131138    }
    132139
     
    154161
    155162            JMenuItem menuResetCookie = new JMenuItem(new MenuActionResetCookie());
    156             JMenuItem menuLambertZone = new JMenuItem(new MenuActionLambertZone());
     163            //JMenuItem menuLambertZone = new JMenuItem(new MenuActionLambertZone());
    157164            JMenuItem menuLoadFromCache = new JMenuItem(new MenuActionLoadFromCache());
     165            // temporary disabled:
    158166            //JMenuItem menuActionBoundaries = new JMenuItem(new MenuActionBoundaries());
    159167            //JMenuItem menuActionBuildings = new JMenuItem(new MenuActionBuildings());
     
    164172            cadastreJMenu.add(menuSource);
    165173            cadastreJMenu.add(menuResetCookie);
    166             cadastreJMenu.add(menuLambertZone);
     174            //cadastreJMenu.add(menuLambertZone);
    167175            cadastreJMenu.add(menuLoadFromCache);
    168176            // all SVG features disabled until official WMS is released
     
    229237                    item.getText().equals(MenuActionBuildings.name)*/) {
    230238                    item.setEnabled(isEnabled);
    231                 } else if (item.getText().equals(MenuActionLambertZone.name)) {
    232                     item.setEnabled(!isEnabled);
    233239                }
    234240        }
     
    244250            } else if (oldFrame != null && newFrame == null) {
    245251                setEnabledAll(false);
    246                 Lambert.layoutZone = -1;
    247                 LambertCC9Zones.layoutZone = -1;
     252                //Lambert.layoutZone = -1;
     253                //LambertCC9Zones.layoutZone = -1;
    248254            }
    249255        }
     
    251257   
    252258    public static boolean isCadastreProjection() {
    253             return Main.proj.toString().equals(new Lambert().toString())
    254             || Main.proj.toString().equals(new UTM_20N_Guadeloupe_Fort_Marigot().toString())
    255             || Main.proj.toString().equals(new UTM_20N_Guadeloupe_Ste_Anne().toString())
    256             || Main.proj.toString().equals(new UTM_20N_Martinique_Fort_Desaix().toString())
     259        return Main.proj.toString().equals(new Lambert().toString())
     260            || Main.proj.toString().equals(new UTM_20N_France_DOM().toString())
    257261            || Main.proj.toString().equals(new GaussLaborde_Reunion().toString())
    258262            || Main.proj.toString().equals(new LambertCC9Zones().toString());
Note: See TracChangeset for help on using the changeset viewer.