[josm-dev] Small patch for Lambert projection

Pieren pieren3 at gmail.com
Wed Aug 20 10:15:34 BST 2008


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]);
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Lambert.txt
URL: <http://lists.openstreetmap.org/pipermail/josm-dev/attachments/20080820/d1bdbe86/attachment.txt>


More information about the josm-dev mailing list