Changeset 6069 in josm for trunk/src/org/openstreetmap/josm/data/coor
- Timestamp:
- 2013-07-17T00:01:07+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/coor
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/coor/CachedLatLon.java
r4126 r6069 7 7 /** 8 8 * LatLon class that maintains a cache of projected EastNorth coordinates. 9 * 9 * 10 10 * This class is convenient to use, but has relatively high memory costs. 11 * It keeps a pointer to the last known projection in order to detect projection 11 * It keeps a pointer to the last known projection in order to detect projection 12 12 * changes. 13 * 13 * 14 14 * Node and WayPoint have another, optimized, cache for projected coordinates. 15 15 */ … … 47 47 /** 48 48 * Replies the projected east/north coordinates. 49 * 49 * 50 50 * @return the internally cached east/north coordinates. null, if the globally defined projection is null 51 51 */ -
trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java
r4640 r6069 60 60 return hd; 61 61 } 62 62 63 63 /** 64 64 * Replies true if east and north are different from Double.NaN 65 * 65 * 66 66 * @return true if east and north are different from Double.NaN 67 67 */ -
trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
r5909 r6069 46 46 cDdFormatter.applyPattern("###0.0######"); 47 47 } 48 48 49 49 private static final String cDms60 = cDmsSecondFormatter.format(60.0); 50 50 private static final String cDms00 = cDmsSecondFormatter.format( 0.0); … … 115 115 int tMinutes = (int) tTmpMinutes; 116 116 double tSeconds = (tTmpMinutes - tMinutes) * 60; 117 117 118 118 String sDegrees = Integer.toString(tDegree); 119 119 String sMinutes = cDmsMinuteFormatter.format(tMinutes); 120 120 String sSeconds = cDmsSecondFormatter.format(tSeconds); 121 121 122 122 if (sSeconds.equals(cDms60)) { 123 123 sSeconds = cDms00; … … 142 142 int tDegree = (int) tAbsCoord; 143 143 double tMinutes = (tAbsCoord - tDegree) * 60; 144 144 145 145 String sDegrees = Integer.toString(tDegree); 146 146 String sMinutes = cDmMinuteFormatter.format(tMinutes); 147 147 148 148 if (sMinutes.equals(cDm60)) { 149 149 sMinutes = cDm00; 150 150 sDegrees = Integer.toString(tDegree+1); 151 151 } 152 152 153 153 return sDegrees + "\u00B0" + sMinutes + "\'"; 154 154 }
Note:
See TracChangeset
for help on using the changeset viewer.