Changeset 86 in josm for src/org/openstreetmap/josm/io/OsmWriter.java
- Timestamp:
- 2006-04-21T14:31:51+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/io/OsmWriter.java
r82 r86 8 8 9 9 import org.openstreetmap.josm.data.osm.DataSet; 10 import org.openstreetmap.josm.data.osm. LineSegment;10 import org.openstreetmap.josm.data.osm.Segment; 11 11 import org.openstreetmap.josm.data.osm.Node; 12 12 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 51 51 for (Node n : ds.nodes) 52 52 writer.visit(n); 53 for ( LineSegment ls : ds.lineSegments)53 for (Segment ls : ds.segments) 54 54 writer.visit(ls); 55 55 for (Way w : ds.ways) … … 80 80 } 81 81 82 public void visit( LineSegment ls) {82 public void visit(Segment ls) { 83 83 if (ls.incomplete) 84 return; // Do not write an incomplete linesegment84 return; // Do not write an incomplete segment 85 85 addCommon(ls, "segment"); 86 86 out.print(" from='"+getUsedId(ls.from)+"' to='"+getUsedId(ls.to)+"'"); … … 91 91 addCommon(w, "way"); 92 92 out.println(">"); 93 for ( LineSegment ls : w.segments)93 for (Segment ls : w.segments) 94 94 out.println(" <seg id='"+getUsedId(ls)+"' />"); 95 95 addTags(w, "way", false); … … 130 130 if (!osmConform) { 131 131 String action = null; 132 if (osm. isDeleted())132 if (osm.deleted) 133 133 action = "delete"; 134 else if (osm.modified && osm.modifiedProperties)134 else if (osm.modified) 135 135 action = "modify"; 136 else if (osm.modified && !osm.modifiedProperties)137 action = "modify/object";138 else if (!osm.modified && osm.modifiedProperties)139 action = "modify/property";140 136 if (action != null) 141 137 out.print(" action='"+action+"'"); 142 138 } 143 if (osm. lastModified!= null) {144 String time = new SimpleDateFormat("y-M-d H:m:s").format(osm. lastModified);139 if (osm.timestamp != null) { 140 String time = new SimpleDateFormat("y-M-d H:m:s").format(osm.timestamp); 145 141 out.print(" timestamp='"+time+"'"); 146 142 }
Note:
See TracChangeset
for help on using the changeset viewer.