Changeset 813 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2008-08-21T00:34:53+02:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java
r748 r813 35 35 * Convert the time stamp of the waypoint into seconds from the epoch 36 36 */ 37 public void setTime 37 public void setTime() { 38 38 if (! attr.containsKey("time")) { 39 time = 0.0;40 39 return; 41 40 } 42 41 SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); // ignore timezone 43 42 Date d = f.parse(attr.get("time").toString(), new ParsePosition(0)); 44 if (d == null /* failed to parse */) { 45 time = 0.0; 46 } else { 43 if (d != null /* parsing ok */) { 44 time = d.getTime() / 1000.0; /* ms => seconds */ 45 } 46 } 47 48 /** 49 * Convert a time stamp of the waypoint from the <cmt> or <desc> field 50 * into seconds from the epoch. Handles the date format as it is used by 51 * Garmin handhelds. Does not overwrite an existing timestamp (!= 0.0). 52 * A value of <time> fields overwrites values set with by method. 53 * Does nothing if specified key does not exist or text cannot be parsed. 54 * 55 * @param key The key that contains the text to convert. 56 */ 57 public void setGarminCommentTime(String key) { 58 // do not overwrite time if already set 59 if (time != 0.0) { 60 return; 61 } 62 if (! attr.containsKey(key)) { 63 return; 64 } 65 // example date format "18-AUG-08 13:33:03" 66 SimpleDateFormat f = new SimpleDateFormat("dd-MMM-yy HH:mm:ss"); // Garmin wpts have no timezone 67 Date d = f.parse(attr.get(key).toString(), new ParsePosition(0)); 68 if (d != null /* parsing OK */) { 47 69 time = d.getTime() / 1000.0; /* ms => seconds */ 48 70 } -
trunk/src/org/openstreetmap/josm/data/osm/visitor/SimplePaintVisitor.java
r805 r813 108 108 fillUnselectedNode = Main.pref.getBoolean("mappaint.node.fill-unselected", false); 109 109 virtualNodeSize = virtual ? Main.pref.getInteger("mappaint.node.virtual-size", 4) / 2 : 0; 110 virtualNodeSpace = Main.pref.getInteger("mappaint.node.virtual-space", 50);110 virtualNodeSpace = Main.pref.getInteger("mappaint.node.virtual-space", 70); 111 111 112 112 ((Graphics2D)g)
Note:
See TracChangeset
for help on using the changeset viewer.