Dear Josm-dev,

Could one of the Josm developers having write access to the repository
submit the following small patch for the Lambert projection class ?

It's to avoid an unnecessery warning message when MAX_LAT / MAX_LON are used.

Note that this time, I renamed the patch with the extension .TXT
hoping that it will not be filterer by the ML. Maybe you will be able
to see it. In the case not, I also copy it below.

Thank you,
regards
Pieren

Index: Lambert.java
===================================================================
--- Lambert.java        (revision 799)
+++ Lambert.java        (working copy)
@@ -100,21 +100,24 @@
         } else {
             outOfLambertZones = true; // possible when MAX_LAT is used
         }
-        if (layoutZone == -1)
-            layoutZone = currentZone;
-        else if (layoutZone != currentZone && !outOfLambertZones) {
-            if ((currentZone < layoutZone &&
Math.abs(zoneLimits[currentZone] - lt) > cMaxOverlappingZones)
-                    || (currentZone > layoutZone &&
Math.abs(zoneLimits[layoutZone] - lt) > cMaxOverlappingZones)) {
-                JOptionPane.showMessageDialog(Main.parent,
-                        tr("IMPORTANT : data positionned far away from\n"
-                                +"the current Lambert zone limits.\n"
-                                +"Undo your last action, Save your work \n"
-                                +"and Start a new layer on the new zone."));
-                layoutZone = -1;
-            } else {
-                System.out.println("temporarily extends Lambert zone
" + layoutZone
-                        + " projection at lat,lon:" + lt + "," + lg);
-            }
+        if (!outOfLambertZones) {
+               if (layoutZone == -1)
+                               layoutZone = currentZone;
+                       else if (layoutZone != currentZone) {
+                               if ((currentZone < layoutZone && 
Math.abs(zoneLimits[currentZone]
- lt) > cMaxOverlappingZones)
+                                       || (currentZone > layoutZone &&
Math.abs(zoneLimits[layoutZone] - lt) > cMaxOverlappingZones)) {
+                                       
JOptionPane.showMessageDialog(Main.parent,
+                                                       tr("IMPORTANT : data 
positionned far away from\n"
+                                                               + "the current 
Lambert zone limits.\n"
+                                                               + "Undo your 
last action, Save your work \n"
+                                                               + "and Start a 
new layer on the new zone."));
+                                       layoutZone = -1;
+                               } else {
+                                       System.out.println("temporarily extends 
Lambert zone "
+                                               + layoutZone + " projection at 
lat,lon:" + lt + ","
+                                               + lg);
+                               }
+                       }
         }
         if (layoutZone == -1) {
             return ConicProjection(lt, lg, Xs[currentZone],
Ys[currentZone], c[currentZone], n[currentZone]);
Index: Lambert.java
===================================================================
--- Lambert.java        (revision 799)
+++ Lambert.java        (working copy)
@@ -100,21 +100,24 @@
         } else {
             outOfLambertZones = true; // possible when MAX_LAT is used
         }
-        if (layoutZone == -1)
-            layoutZone = currentZone;
-        else if (layoutZone != currentZone && !outOfLambertZones) {
-            if ((currentZone < layoutZone && Math.abs(zoneLimits[currentZone] 
- lt) > cMaxOverlappingZones)
-                    || (currentZone > layoutZone && 
Math.abs(zoneLimits[layoutZone] - lt) > cMaxOverlappingZones)) {
-                JOptionPane.showMessageDialog(Main.parent,
-                        tr("IMPORTANT : data positionned far away from\n"
-                                +"the current Lambert zone limits.\n"
-                                +"Undo your last action, Save your work \n"
-                                +"and Start a new layer on the new zone."));
-                layoutZone = -1;
-            } else {
-                System.out.println("temporarily extends Lambert zone " + 
layoutZone 
-                        + " projection at lat,lon:" + lt + "," + lg);
-            }
+        if (!outOfLambertZones) {
+               if (layoutZone == -1)
+                               layoutZone = currentZone;
+                       else if (layoutZone != currentZone) {
+                               if ((currentZone < layoutZone && 
Math.abs(zoneLimits[currentZone] - lt) > cMaxOverlappingZones)
+                                       || (currentZone > layoutZone && 
Math.abs(zoneLimits[layoutZone] - lt) > cMaxOverlappingZones)) {
+                                       
JOptionPane.showMessageDialog(Main.parent,
+                                                       tr("IMPORTANT : data 
positionned far away from\n"
+                                                               + "the current 
Lambert zone limits.\n"
+                                                               + "Undo your 
last action, Save your work \n"
+                                                               + "and Start a 
new layer on the new zone."));
+                                       layoutZone = -1;
+                               } else {
+                                       System.out.println("temporarily extends 
Lambert zone "
+                                               + layoutZone + " projection at 
lat,lon:" + lt + ","
+                                               + lg);
+                               }
+                       }
         }
         if (layoutZone == -1) {
             return ConicProjection(lt, lg, Xs[currentZone], Ys[currentZone], 
c[currentZone], n[currentZone]);
_______________________________________________
josm-dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/josm-dev

Reply via email to