Ticket #3084: Lambert.patch

File Lambert.patch, 2.2 KB (added by pieren, 16 years ago)

patch for #3084

  • Lambert.java

     
    1212import org.openstreetmap.josm.data.coor.EastNorth;
    1313import org.openstreetmap.josm.data.coor.LatLon;
    1414import org.openstreetmap.josm.data.Bounds;
    15 import org.openstreetmap.josm.data.ProjectionBounds;
    1615
    1716public class Lambert implements Projection {
    1817    /**
     
    6968
    7069    private static int currentZone = 0;
    7170
    72     private static boolean dontDisplayErrors = false;
    73 
    7471    /**
    7572     * @param p  WGS84 lat/lon (ellipsoid GRS80) (in degree)
    7673     * @return eastnorth projection in Lambert Zone (ellipsoid Clark)
     
    109106        if (!outOfLambertZones) {
    110107            if (layoutZone == -1) {
    111108                layoutZone = currentZone;
    112                 dontDisplayErrors = false;
    113109            } else if (layoutZone != currentZone) {
    114110                if ((currentZone < layoutZone && Math.abs(zoneLimits[currentZone] - lt) > cMaxOverlappingZones)
    115111                || (currentZone > layoutZone && Math.abs(zoneLimits[layoutZone] - lt) > cMaxOverlappingZones)) {
     
    120116                    + "Undo your last action, save your work\n"
    121117                    + "and start a new layer on the new zone."));
    122118                    layoutZone = -1;
    123                     dontDisplayErrors = true;
    124119                } else {
    125120                    System.out.println("temporarily extend Lambert zone " + layoutZone + " projection at lat,lon:"
    126121                            + lt + "," + lg);
    127122                }
    128123            }
    129124        }
    130         if (layoutZone == -1) {
     125        if (layoutZone == -1)
    131126            return ConicProjection(lt, lg, Xs[currentZone], Ys[currentZone], c[currentZone], n[currentZone]);
    132         } // else
    133127        return ConicProjection(lt, lg, Xs[layoutZone], Ys[layoutZone], c[layoutZone], n[layoutZone]);
    134128    }
    135129
     
    279273    public Bounds getWorldBoundsLatLon()
    280274    {
    281275        return new Bounds(
    282         new LatLon(-90.0, -180.0),
    283         new LatLon(90.0, 180.0));
     276                new LatLon(45.0, -4.9074074074074059),
     277                new LatLon(57.0, 10.2));
    284278    }
    285279}