Changeset 5523 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2012-09-30T23:59:28+02:00 (12 years ago)
Author:
Don-vip
Message:

fix #7994 - WGS84-DMS-ordinates are shown as 01'60,0" instead of 02'00,0"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/coor/LatLon.java

    r5474 r5523  
    4646        cDdFormatter.applyPattern("###0.0######");
    4747    }
     48   
     49    private static final String cDms60 = cDmsSecondFormatter.format(60.0);
     50    private static final String cDms00 = cDmsSecondFormatter.format( 0.0);
     51    private static final String cDm60 = cDmMinuteFormatter.format(60.0);
     52    private static final String cDm00 = cDmMinuteFormatter.format( 0.0);
    4853
    4954    /**
     
    115120        String sSeconds = cDmsSecondFormatter.format(tSeconds);
    116121       
    117         if (sSeconds.equals("60.0")) {
    118             sSeconds = "00.0";
     122        if (sSeconds.equals(cDms60)) {
     123            sSeconds = cDms00;
    119124            sMinutes = cDmsMinuteFormatter.format(tMinutes+1);
    120125        }
     
    141146        String sMinutes = cDmMinuteFormatter.format(tMinutes);
    142147       
    143         if (sMinutes.equals("60.000")) {
    144             sMinutes = "00.000";
     148        if (sMinutes.equals(cDm60)) {
     149            sMinutes = cDm00;
    145150            sDegrees = Integer.toString(tDegree+1);
    146151        }
Note: See TracChangeset for help on using the changeset viewer.