Index: /trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/coor/LatLon.java	(revision 5473)
+++ /trunk/src/org/openstreetmap/josm/data/coor/LatLon.java	(revision 5474)
@@ -100,4 +100,6 @@
     /**
      * Replies the coordinate in degrees/minutes/seconds format
+     * @param pCoordinate The coordinate to convert
+     * @return The coordinate in degrees/minutes/seconds format
      */
     public static String dms(double pCoordinate) {
@@ -108,9 +110,26 @@
         int tMinutes = (int) tTmpMinutes;
         double tSeconds = (tTmpMinutes - tMinutes) * 60;
-
-        return tDegree + "\u00B0" + cDmsMinuteFormatter.format(tMinutes) + "\'"
-        + cDmsSecondFormatter.format(tSeconds) + "\"";
-    }
-
+        
+        String sDegrees = Integer.toString(tDegree);
+        String sMinutes = cDmsMinuteFormatter.format(tMinutes);
+        String sSeconds = cDmsSecondFormatter.format(tSeconds);
+        
+        if (sSeconds.equals("60.0")) {
+            sSeconds = "00.0";
+            sMinutes = cDmsMinuteFormatter.format(tMinutes+1);
+        }
+        if (sMinutes.equals("60")) {
+            sMinutes = "00";
+            sDegrees = Integer.toString(tDegree+1);
+        }
+
+        return sDegrees + "\u00B0" + sMinutes + "\'" + sSeconds + "\"";
+    }
+
+    /**
+     * Replies the coordinate in degrees/minutes format
+     * @param pCoordinate The coordinate to convert
+     * @return The coordinate in degrees/minutes format
+     */
     public static String dm(double pCoordinate) {
 
@@ -118,5 +137,14 @@
         int tDegree = (int) tAbsCoord;
         double tMinutes = (tAbsCoord - tDegree) * 60;
-        return tDegree + "\u00B0" + cDmMinuteFormatter.format(tMinutes) + "\'";
+        
+        String sDegrees = Integer.toString(tDegree);
+        String sMinutes = cDmMinuteFormatter.format(tMinutes);
+        
+        if (sMinutes.equals("60.000")) {
+            sMinutes = "00.000";
+            sDegrees = Integer.toString(tDegree+1);
+        }
+        
+        return sDegrees + "\u00B0" + sMinutes + "\'";
     }
 
